Commit e983b77c3d673a58c7b665bc27a2b4ae7f253910

Authored by muyulingshi
1 parent 5842d3b9

rm bug

1   -var TAXONNOMY_LINK_LIST = {};
2   -$('#taxonomy .menu-item__link').each(function (index) {
3   - TAXONNOMY_LINK_LIST[index] = {
4   - 'taxonomy':$(this).text(),
5   - 'url':/[0-9]*$/.exec($(this).attr('href'))[0]
6   - };
7   -});
  1 +(function ($) {
  2 + var TAXONNOMY_LINK_LIST = {};
  3 + $('#taxonomy .menu-item__link').each(function (index) {
  4 + TAXONNOMY_LINK_LIST[index] = {
  5 + 'taxonomy':$(this).text(),
  6 + 'url':/[0-9]*$/.exec($(this).attr('href'))[0]
  7 + };
  8 + });
8 9
9   -console.log(JSON.stringify(TAXONNOMY_LINK_LIST));
  10 + console.log(JSON.stringify(TAXONNOMY_LINK_LIST));
  11 +
  12 +})(jQuery)
... ...
... ... @@ -12,7 +12,7 @@
12 12 'use strict';
13 13
14 14 // Your code here...
15   - var MENU_DATE = {};
  15 + var MENU_DATE = {}
16 16
17 17 var TAXONOMY_DATE = {};
18 18
... ... @@ -79,7 +79,7 @@
79 79 if ($('#edit-title-0-value').length > 0 && $('#edit-link-0-uri').length > 0 && hasStorage('menu_date', MENU_DATE) && hasStorage('link_date', TAXONOMY_DATE)) {
80 80 var MenusettingObj = storageOper('menu_date', $.parseJSON(localStorage.getItem('menu_date')));
81 81 $('#edit-link-0-uri').val('/');
82   - $('#edit-title-0-value').val(MenuMenusettingObj.title);
  82 + $('#edit-title-0-value').val(MenusettingObj.title);
83 83
84 84 if (MenusettingObj.hasOwnProperty('parent')) {
85 85 $('#edit-menu-parent option').each(function() {
... ...
Please register or login to post a comment