Minor fixes.
[redakcja.git] / redakcja / static / js / wiki_img / view_editor_motifs.js
index 7ce9665..11cbef0 100644 (file)
@@ -7,7 +7,7 @@
         options.callback = function(){
             var self = this;
 
         options.callback = function(){
             var self = this;
 
-            self.$tag_name = $('#motifs-editor #tag-name');
+            self.$tag_name = $('#motifs-editor .tag-name');
             withThemes(function(canonThemes){
                 self.$tag_name.autocomplete(canonThemes, {
                     autoFill: true,
             withThemes(function(canonThemes){
                 self.$tag_name.autocomplete(canonThemes, {
                     autoFill: true,
@@ -17,7 +17,7 @@
                 });
             })
 
                 });
             })
 
-            self.$objects_list = $('#motifs-editor #objects-list');
+            self.$objects_list = $('#motifs-editor .objects-list');
 
             self.x1 = null;
             self.x2 = null;
 
             self.x1 = null;
             self.x2 = null;
@@ -26,7 +26,7 @@
 
             if (!CurrentDocument.readonly) {
                 self.ias = $('#motifs-editor img.area-selectable').imgAreaSelect({ handles: true, onSelectEnd: self._fillCoords(self), instance: true });
 
             if (!CurrentDocument.readonly) {
                 self.ias = $('#motifs-editor img.area-selectable').imgAreaSelect({ handles: true, onSelectEnd: self._fillCoords(self), instance: true });
-                $('#motifs-editor #add').click(self._addObject(self));
+                $('#motifs-editor .add').click(self._addObject(self));
 
                 $('.delete', self.$objects_list).live('click', function() {
                     $(this).prev().trigger('click');
 
                 $('.delete', self.$objects_list).live('click', function() {
                     $(this).prev().trigger('click');
         var self = this;
         this.$objects_list.children().remove();
 
         var self = this;
         this.$objects_list.children().remove();
 
-        $.each(this.doc.getImageItems('motyw'), function(i, e) {
+        $.each(this.doc.getImageItems('theme'), function(i, e) {
             self._push.apply(self, e);
         });
 
             self._push.apply(self, e);
         });
 
             args.unshift($(e).text());
             motifs.push(args);
         })
             args.unshift($(e).text());
             motifs.push(args);
         })
-        self.doc.setImageItems('motyw', motifs);
+        self.doc.setImageItems('theme', motifs);
 
         this.ias.setOptions({disable: true, hide: true});
 
 
         this.ias.setOptions({disable: true, hide: true});