Robert Autenrieth 8 лет назад
Родитель
Сommit
ee9c0b9bfb
3 измененных файлов: 15 добавлений и 18 удалений
  1. 4
    4
      generator/js/cards.js
  2. 1
    1
      generator/js/output.js
  3. 10
    13
      generator/js/ui.js

+ 4
- 4
generator/js/cards.js Просмотреть файл

@@ -15,7 +15,7 @@ function card_default_options() {
15 15
         card_size: "25x35",
16 16
         card_count: null,
17 17
         icon_inline: true
18
-    }
18
+    };
19 19
 }
20 20
 
21 21
 function card_default_data() {
@@ -24,7 +24,7 @@ function card_default_data() {
24 24
         title: "New card",
25 25
         contents: [],
26 26
         tags: []
27
-    }
27
+    };
28 28
 }
29 29
 
30 30
 function card_init(card) {
@@ -329,13 +329,13 @@ function card_generate_front(data, options) {
329 329
 }
330 330
 
331 331
 function card_generate_back(data, options) {
332
-    var color = card_data_color_back(data, options)
332
+    var color = card_data_color_back(data, options);
333 333
     var style_color = card_generate_color_style(color, options);
334 334
 	var url = data.background_image;
335 335
 	var background_style = "";
336 336
 	if (url)
337 337
 	{
338
-		background_style = 'style = "background-image: url("' + url + '"); background-size: contain; background-position: center; background-repeat: no-repeat;"'
338
+		background_style = 'style = "background-image: url("' + url + '"); background-size: contain; background-position: center; background-repeat: no-repeat;"';
339 339
 	}
340 340
 	else 
341 341
 	{

+ 1
- 1
generator/js/output.js Просмотреть файл

@@ -19,4 +19,4 @@ function insertCards(html) {
19 19
     document.body.appendChild(div);
20 20
 }
21 21
 
22
-window.addEventListener("message", receiveMessage, false);
22
+window.addEventListener("message", receiveMessage, false);

+ 10
- 13
generator/js/ui.js Просмотреть файл

@@ -54,7 +54,7 @@ function ui_generate() {
54 54
 
55 55
     // Send the generated HTML to the new window
56 56
     // Use a delay to give the new window time to set up a message listener
57
-    setTimeout(function () { tab.postMessage(card_html, '*') }, 500);
57
+    setTimeout(function () { tab.postMessage(card_html, '*'); }, 500);
58 58
 }
59 59
 
60 60
 function ui_load_sample() {
@@ -190,7 +190,7 @@ function ui_update_selected_card() {
190 190
         $("#card-count").val(1);
191 191
         $("#card-icon").val("");
192 192
         $("#card-icon-back").val("");
193
-		$("#card-background").val("")
193
+		$("#card-background").val("");
194 194
         $("#card-contents").val("");
195 195
         $("#card-tags").val("");
196 196
         $("#card-color").val("").change();
@@ -207,7 +207,7 @@ function ui_render_selected_card() {
207 207
         var back = card_generate_back(card, card_options);
208 208
         $('#preview-container').html(front + "\n" + back);
209 209
     }
210
-    local_store_save()
210
+    local_store_save();
211 211
 }
212 212
 
213 213
 function ui_open_help() {
@@ -351,12 +351,12 @@ function ui_change_card_contents() {
351 351
 }
352 352
 
353 353
 function ui_change_card_contents_keyup () {
354
-    clearTimeout(ui_change_card_contents_keyup.timeout)
354
+    clearTimeout(ui_change_card_contents_keyup.timeout);
355 355
     ui_change_card_contents_keyup.timeout = setTimeout(function () {
356
-        $('#card-contents').trigger('change')
357
-    }, 200)
356
+        $('#card-contents').trigger('change');
357
+    }, 200);
358 358
 }
359
-ui_change_card_contents_keyup.timeout = null
359
+ui_change_card_contents_keyup.timeout = null;
360 360
 
361 361
 function ui_change_card_tags() {
362 362
     var value = $(this).val();
@@ -469,7 +469,7 @@ $(document).ready(function () {
469 469
     local_store_load();
470 470
     ui_setup_color_selector();
471 471
     $('.icon-list').typeahead({
472
-        source:icon_names,
472
+        source: icon_names,
473 473
         items: 'all',
474 474
         render: function (items) {
475 475
           var that = this;
@@ -477,8 +477,8 @@ $(document).ready(function () {
477 477
           items = $(items).map(function (i, item) {
478 478
             i = $(that.options.item).data('value', item);
479 479
             i.find('a').html(that.highlighter(item));
480
-            var classname = 'icon-' + item.split(' ').join('-').toLowerCase()
481
-            i.find('a').append('<span class="' + classname + '"></span>')
480
+            var classname = 'icon-' + item.split(' ').join('-').toLowerCase();
481
+            i.find('a').append('<span class="' + classname + '"></span>');
482 482
             return i[0];
483 483
           });
484 484
 
@@ -540,6 +540,3 @@ $(document).ready(function () {
540 540
 
541 541
     ui_update_card_list();
542 542
 });
543
-
544
-
545
-

Загрузка…
Отмена
Сохранить