From: Aleksander Łukasz Date: Wed, 2 Jul 2014 10:31:27 +0000 (+0200) Subject: editor: removing unused code X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/5145fc38a6bf044367f4d96197dd3d47e05b6266?ds=sidebyside editor: removing unused code --- diff --git a/src/editor/modules/documentCanvas/canvas/genericElement.js b/src/editor/modules/documentCanvas/canvas/genericElement.js index a703b0c..e769ee8 100644 --- a/src/editor/modules/documentCanvas/canvas/genericElement.js +++ b/src/editor/modules/documentCanvas/canvas/genericElement.js @@ -6,15 +6,8 @@ var $ = require('libs/jquery'), _ = require('libs/underscore'), documentElement = require('./documentElement'), utils = require('./utils'), - wlxmlUtils = require('utils/wlxml'), CommentsView = require('./comments/comments'); -var labelWidget = function(tag, klass) { - return $('') - .addClass('canvas-widget canvas-widget-label') - .text(wlxmlUtils.getTagLabel(tag) + (klass ? ' / ' + wlxmlUtils.getClassLabel(klass) : '')); -}; -void(labelWidget); // for linters; labelWidget is unused on purpose for now var DocumentNodeElement = documentElement.DocumentNodeElement; diff --git a/src/editor/utils/wlxml.js b/src/editor/utils/wlxml.js deleted file mode 100644 index 9935655..0000000 --- a/src/editor/utils/wlxml.js +++ /dev/null @@ -1,48 +0,0 @@ -define([ - -], function() { - -'use strict'; - - - -var names = { - tag: { - '': '-', - section: 'sekcja', - header: 'nagłówek', - div: 'blok', - span: 'tekst', - aside: 'poboczny' - }, - 'class': { - '': '-', - author: 'autor', - title: 'tytuł', - cite: 'cytat', - 'cite.code': 'cytat.kod', - 'cite.code.xml': 'cytat.kod.xml', - 'list.items': 'lista', - 'list.items.enum': 'lista.numerowana', - item: 'element', - uri: 'uri', - p: 'paragraf', - footnote: 'przypis', - todo: 'todo', - emp: 'wyróżnienie' - } -}; - -return { - getLabel: function(of, name) { - return (names[of] && (names[of][name] || name)) || '?'; - }, - getTagLabel: function(tagName) { - return this.getLabel('tag', tagName); - }, - getClassLabel: function(className) { - return this.getLabel('class', className); - } -}; - -}); \ No newline at end of file