Custom wlxml names in label widget
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 7 Aug 2013 21:30:38 +0000 (23:30 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 7 Aug 2013 21:30:38 +0000 (23:30 +0200)
karma.conf.js
modules/documentCanvas/canvas/widgets.js

index 5153a22..ea3a375 100644 (file)
@@ -10,6 +10,7 @@ files = [
   {pattern: 'libs/*.js', included: false},
   {pattern: 'fnpjs/**/*.js', included: false},
   {pattern: 'modules/**/*.js', included: false},
   {pattern: 'libs/*.js', included: false},
   {pattern: 'fnpjs/**/*.js', included: false},
   {pattern: 'modules/**/*.js', included: false},
+  {pattern: 'utils/**/*.js', included: false},
   {pattern: 'views/**/*.js', included: false},
   {pattern: 'fnpjs/**/*.html', included: false},
   {pattern: 'modules/**/*.html', included: false},
   {pattern: 'views/**/*.js', included: false},
   {pattern: 'fnpjs/**/*.html', included: false},
   {pattern: 'modules/**/*.html', included: false},
index 570bd0b..033feda 100644 (file)
@@ -1,6 +1,7 @@
 define([
 define([
-'libs/jquery-1.9.1.min'
-], function($) {
+'libs/jquery-1.9.1.min',
+'utils/wlxml'
+], function($, wlxmlUtils) {
     
 'use strict';
 
     
 'use strict';
 
@@ -8,7 +9,7 @@ return {
     labelWidget: function(tag, klass) {
         return $('<span>')
             .addClass('canvas-widget canvas-widget-label')
     labelWidget: function(tag, klass) {
         return $('<span>')
             .addClass('canvas-widget canvas-widget-label')
-            .text(tag + (klass ? ' / ' + klass : ''));
+            .text(wlxmlUtils.wlxmlTagNames[tag] + (klass ? ' / ' + wlxmlUtils.wlxmlClassNames[klass] : ''));
     },
 
     footnoteHandler: function(clickHandler) {
     },
 
     footnoteHandler: function(clickHandler) {