Fix Mascot Settings dialog

This commit is contained in:
Zixaphir 2015-01-10 03:35:39 -07:00
parent eda8a65132
commit 76b60e4d4d
3 changed files with 34 additions and 21 deletions

View File

@ -19493,7 +19493,8 @@
mascotHide = $.el("div", {
id: "mascot_hide",
className: "reply"
}, {
});
$.extend(mascotHide, {
innerHTML: "Hide Categories <span class=\"drop-marker\"></span><div></div>"
});
keys = Object.keys(Mascots);
@ -19501,7 +19502,8 @@
if (mode === 'default') {
mascotoptions = $.el('div', {
id: 'mascot-options'
}, {
});
$.extend(mascotoptions, {
innerHTML: "<a class=\"edit\" href=\"javascript:;\">Edit</a><a class=\"delete\" href=\"javascript:;\">Delete</a><a class=\"export\" href=\"javascript:;\">Export</a>"
});
$.on($('.edit', mascotoptions), 'click', cb.edit);
@ -19519,13 +19521,13 @@
menu = $('div', mascotHide);
categories[name] = div = $.el("div", {
id: name,
className: "mascots-container"
}, {
innerHTML: "<h3 class=\"mascotHeader\">" + E(name) + "</h3>"
}, {
className: "mascots-container",
hidden: __indexOf.call(Conf["Hidden Categories"], name) >= 0
});
option = UI.checkbox(name, name, __indexOf.call(Conf["Hidden Categories"], name) >= 0);
$.extend(categories[name], {
innerHTML: "<h3 class=\"mascotHeader\">" + E(name) + "</h3>"
});
option = UI.checkbox(name, name, (__indexOf.call(Conf["Hidden Categories"], name) >= 0));
$.on($('input', option), 'change', cb.category);
$.add(suboptions, div);
$.add(menu, option);
@ -19540,7 +19542,7 @@
id: name,
className: __indexOf.call(Conf[g.MASCOTSTRING], name) >= 0 ? 'mascot enabled' : 'mascot'
});
$.extend(div, {
$.extend(mascotEl, {
innerHTML: "<div class='mascotname'>" + (name.replace(/_/g, ' ')) + "</div>\r<div class='mascotcontainer " + (mascot.silhouette ? 'silhouette' : '') + "'><div class='mAlign " + mascot.category + "'><img class='mascotimg' src='" + mascot.image + "'></div></div>"
});
$.on(mascotEl, 'click', cb.select);
@ -19616,7 +19618,8 @@
$.add(suboptions, container);
batchmascots = $.el('div', {
id: "mascots_batch"
}, {
});
$.extend(batchmascots, {
innerHTML: "<a href=\"javascript:;\" id=\"return\">Return</a>"
});
$.on($('#return', batchmascots), 'click', function() {

View File

@ -19528,7 +19528,8 @@
mascotHide = $.el("div", {
id: "mascot_hide",
className: "reply"
}, {
});
$.extend(mascotHide, {
innerHTML: "Hide Categories <span class=\"drop-marker\"></span><div></div>"
});
keys = Object.keys(Mascots);
@ -19536,7 +19537,8 @@
if (mode === 'default') {
mascotoptions = $.el('div', {
id: 'mascot-options'
}, {
});
$.extend(mascotoptions, {
innerHTML: "<a class=\"edit\" href=\"javascript:;\">Edit</a><a class=\"delete\" href=\"javascript:;\">Delete</a><a class=\"export\" href=\"javascript:;\">Export</a>"
});
$.on($('.edit', mascotoptions), 'click', cb.edit);
@ -19554,13 +19556,13 @@
menu = $('div', mascotHide);
categories[name] = div = $.el("div", {
id: name,
className: "mascots-container"
}, {
innerHTML: "<h3 class=\"mascotHeader\">" + E(name) + "</h3>"
}, {
className: "mascots-container",
hidden: __indexOf.call(Conf["Hidden Categories"], name) >= 0
});
option = UI.checkbox(name, name, __indexOf.call(Conf["Hidden Categories"], name) >= 0);
$.extend(categories[name], {
innerHTML: "<h3 class=\"mascotHeader\">" + E(name) + "</h3>"
});
option = UI.checkbox(name, name, (__indexOf.call(Conf["Hidden Categories"], name) >= 0));
$.on($('input', option), 'change', cb.category);
$.add(suboptions, div);
$.add(menu, option);
@ -19575,7 +19577,7 @@
id: name,
className: __indexOf.call(Conf[g.MASCOTSTRING], name) >= 0 ? 'mascot enabled' : 'mascot'
});
$.extend(div, {
$.extend(mascotEl, {
innerHTML: "<div class='mascotname'>" + (name.replace(/_/g, ' ')) + "</div>\r<div class='mascotcontainer " + (mascot.silhouette ? 'silhouette' : '') + "'><div class='mAlign " + mascot.category + "'><img class='mascotimg' src='" + mascot.image + "'></div></div>"
});
$.on(mascotEl, 'click', cb.select);
@ -19651,7 +19653,8 @@
$.add(suboptions, container);
batchmascots = $.el('div', {
id: "mascots_batch"
}, {
});
$.extend(batchmascots, {
innerHTML: "<a href=\"javascript:;\" id=\"return\">Return</a>"
});
$.on($('#return', batchmascots), 'click', function() {

View File

@ -643,6 +643,8 @@ Settings =
mascotHide = $.el "div",
id: "mascot_hide"
className: "reply"
$.extend mascotHide,
<%= html('Hide Categories <span class="drop-marker"></span><div></div>') %>
keys = Object.keys Mascots
@ -651,6 +653,8 @@ Settings =
if mode is 'default'
mascotoptions = $.el 'div',
id: 'mascot-options'
$.extend mascotoptions,
<%= html('<a class="edit" href="javascript:;">Edit</a><a class="delete" href="javascript:;">Delete</a><a class="export" href="javascript:;">Export</a>') %>
$.on $('.edit', mascotoptions), 'click', cb.edit
@ -667,10 +671,12 @@ Settings =
categories[name] = div = $.el "div",
id: name
className: "mascots-container"
<%= html('<h3 class="mascotHeader">${name}</h3>') %>
hidden: name in Conf["Hidden Categories"]
$.extend categories[name],
<%= html('<h3 class="mascotHeader">${name}</h3>') %>
option = UI.checkbox name, name, name in Conf["Hidden Categories"]
option = UI.checkbox name, name, (name in Conf["Hidden Categories"])
$.on $('input', option), 'change', cb.category
@ -684,7 +690,7 @@ Settings =
id: name
className: if name in Conf[g.MASCOTSTRING] then 'mascot enabled' else 'mascot'
$.extend div, <%= importHTML('Settings/Mascot') %>
$.extend mascotEl, <%= importHTML('Settings/Mascot') %>
$.on mascotEl, 'click', cb.select
$.on mascotEl, 'mouseover', addoptions
@ -747,6 +753,7 @@ Settings =
batchmascots = $.el 'div',
id: "mascots_batch"
$.extend batchmascots,
<%= html('<a href="javascript:;" id="return">Return</a>') %>
$.on $('#return', batchmascots), 'click', ->