From 5f05c86d9271341a5fb134deaeb92de4663c9ca4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Wed, 7 Aug 2013 23:30:38 +0200 Subject: [PATCH 1/1] Custom wlxml names in label widget --- karma.conf.js | 1 + modules/documentCanvas/canvas/widgets.js | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index 5153a22..ea3a375 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -10,6 +10,7 @@ files = [ {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}, diff --git a/modules/documentCanvas/canvas/widgets.js b/modules/documentCanvas/canvas/widgets.js index 570bd0b..033feda 100644 --- a/modules/documentCanvas/canvas/widgets.js +++ b/modules/documentCanvas/canvas/widgets.js @@ -1,6 +1,7 @@ define([ -'libs/jquery-1.9.1.min' -], function($) { +'libs/jquery-1.9.1.min', +'utils/wlxml' +], function($, wlxmlUtils) { 'use strict'; @@ -8,7 +9,7 @@ return { labelWidget: function(tag, klass) { return $('') .addClass('canvas-widget canvas-widget-label') - .text(tag + (klass ? ' / ' + klass : '')); + .text(wlxmlUtils.wlxmlTagNames[tag] + (klass ? ' / ' + wlxmlUtils.wlxmlClassNames[klass] : '')); }, footnoteHandler: function(clickHandler) { -- 2.20.1