Fix template js bug.

Update announcement and gallery sidebar order and icon.
This commit is contained in:
BoHung Chiu 2021-06-22 18:53:14 +08:00
parent 6fe176fc20
commit 59b02e40e0
19 changed files with 433 additions and 8 deletions

View File

@ -7,11 +7,19 @@
window.clearTimeout(timeout_id) window.clearTimeout(timeout_id)
if (window.innerWidth < 768) { if (window.innerWidth < 768) {
} else { } else {
timeout_id = setTimeout(function(){ if($("div.aside").length == 0){
if($('.mobile-menu .modules-menu').length > 0){ timeout_id = setTimeout(function(){
$("header .container").append($('.mobile-menu .modules-menu')) if($('.mobile-menu .modules-menu').length > 0){
} $("header .container").append($('.mobile-menu .modules-menu'))
}, 500); }
}, 500);
}else{
timeout_id = setTimeout(function(){
if($('.modules-menu').length > 0){
$("div.aside").eq(0).append($('.modules-menu'))
}
}, 500);
}
} }
}) })
}) })

View File

@ -0,0 +1,26 @@
;(function($, win, undefined) {
// ECMAScript 5 嚴格模式
'use strict';
$(document).ready(function() {
var timeout_id;
$(window).resize(function() {
window.clearTimeout(timeout_id)
if (window.innerWidth < 768) {
} else {
if($("div.aside").length == 0){
timeout_id = setTimeout(function(){
if($('.mobile-menu .modules-menu').length > 0){
$("header .container").append($('.mobile-menu .modules-menu'))
}
}, 500);
}else{
timeout_id = setTimeout(function(){
if($('.modules-menu').length > 0){
$("div.aside").eq(0).append($('.modules-menu'))
}
}, 500);
}
}
})
})
}(jQuery, window));

View File

@ -0,0 +1,26 @@
;(function($, win, undefined) {
// ECMAScript 5 嚴格模式
'use strict';
$(document).ready(function() {
var timeout_id;
$(window).resize(function() {
window.clearTimeout(timeout_id)
if (window.innerWidth < 768) {
} else {
if($("div.aside").length == 0){
timeout_id = setTimeout(function(){
if($('.mobile-menu .modules-menu').length > 0){
$("header .container").append($('.mobile-menu .modules-menu'))
}
}, 500);
}else{
timeout_id = setTimeout(function(){
if($('.modules-menu').length > 0){
$("div.aside").eq(0).append($('.modules-menu'))
}
}, 500);
}
}
})
})
}(jQuery, window));

View File

@ -0,0 +1,26 @@
;(function($, win, undefined) {
// ECMAScript 5 嚴格模式
'use strict';
$(document).ready(function() {
var timeout_id;
$(window).resize(function() {
window.clearTimeout(timeout_id)
if (window.innerWidth < 768) {
} else {
if($("div.aside").length == 0){
timeout_id = setTimeout(function(){
if($('.mobile-menu .modules-menu').length > 0){
$("header .container").append($('.mobile-menu .modules-menu'))
}
}, 500);
}else{
timeout_id = setTimeout(function(){
if($('.modules-menu').length > 0){
$("div.aside").eq(0).append($('.modules-menu'))
}
}, 500);
}
}
})
})
}(jQuery, window));

View File

@ -0,0 +1,26 @@
;(function($, win, undefined) {
// ECMAScript 5 嚴格模式
'use strict';
$(document).ready(function() {
var timeout_id;
$(window).resize(function() {
window.clearTimeout(timeout_id)
if (window.innerWidth < 768) {
} else {
if($("div.aside").length == 0){
timeout_id = setTimeout(function(){
if($('.mobile-menu .modules-menu').length > 0){
$("header .container").append($('.mobile-menu .modules-menu'))
}
}, 500);
}else{
timeout_id = setTimeout(function(){
if($('.modules-menu').length > 0){
$("div.aside").eq(0).append($('.modules-menu'))
}
}, 500);
}
}
})
})
}(jQuery, window));

View File

@ -0,0 +1,26 @@
;(function($, win, undefined) {
// ECMAScript 5 嚴格模式
'use strict';
$(document).ready(function() {
var timeout_id;
$(window).resize(function() {
window.clearTimeout(timeout_id)
if (window.innerWidth < 768) {
} else {
if($("div.aside").length == 0){
timeout_id = setTimeout(function(){
if($('.mobile-menu .modules-menu').length > 0){
$("header .container").append($('.mobile-menu .modules-menu'))
}
}, 500);
}else{
timeout_id = setTimeout(function(){
if($('.modules-menu').length > 0){
$("div.aside").eq(0).append($('.modules-menu'))
}
}, 500);
}
}
})
})
}(jQuery, window));

View File

@ -0,0 +1,26 @@
;(function($, win, undefined) {
// ECMAScript 5 嚴格模式
'use strict';
$(document).ready(function() {
var timeout_id;
$(window).resize(function() {
window.clearTimeout(timeout_id)
if (window.innerWidth < 768) {
} else {
if($("div.aside").length == 0){
timeout_id = setTimeout(function(){
if($('.mobile-menu .modules-menu').length > 0){
$("header .container").append($('.mobile-menu .modules-menu'))
}
}, 500);
}else{
timeout_id = setTimeout(function(){
if($('.modules-menu').length > 0){
$("div.aside").eq(0).append($('.modules-menu'))
}
}, 500);
}
}
})
})
}(jQuery, window));

View File

@ -0,0 +1,26 @@
;(function($, win, undefined) {
// ECMAScript 5 嚴格模式
'use strict';
$(document).ready(function() {
var timeout_id;
$(window).resize(function() {
window.clearTimeout(timeout_id)
if (window.innerWidth < 768) {
} else {
if($("div.aside").length == 0){
timeout_id = setTimeout(function(){
if($('.mobile-menu .modules-menu').length > 0){
$("header .container").append($('.mobile-menu .modules-menu'))
}
}, 500);
}else{
timeout_id = setTimeout(function(){
if($('.modules-menu').length > 0){
$("div.aside").eq(0).append($('.modules-menu'))
}
}, 500);
}
}
})
})
}(jQuery, window));

View File

@ -0,0 +1,26 @@
;(function($, win, undefined) {
// ECMAScript 5 嚴格模式
'use strict';
$(document).ready(function() {
var timeout_id;
$(window).resize(function() {
window.clearTimeout(timeout_id)
if (window.innerWidth < 768) {
} else {
if($("div.aside").length == 0){
timeout_id = setTimeout(function(){
if($('.mobile-menu .modules-menu').length > 0){
$("header .container").append($('.mobile-menu .modules-menu'))
}
}, 500);
}else{
timeout_id = setTimeout(function(){
if($('.modules-menu').length > 0){
$("div.aside").eq(0).append($('.modules-menu'))
}
}, 500);
}
}
})
})
}(jQuery, window));

View File

@ -0,0 +1,26 @@
;(function($, win, undefined) {
// ECMAScript 5 嚴格模式
'use strict';
$(document).ready(function() {
var timeout_id;
$(window).resize(function() {
window.clearTimeout(timeout_id)
if (window.innerWidth < 768) {
} else {
if($("div.aside").length == 0){
timeout_id = setTimeout(function(){
if($('.mobile-menu .modules-menu').length > 0){
$("header .container").append($('.mobile-menu .modules-menu'))
}
}, 500);
}else{
timeout_id = setTimeout(function(){
if($('.modules-menu').length > 0){
$("div.aside").eq(0).append($('.modules-menu'))
}
}, 500);
}
}
})
})
}(jQuery, window));

View File

@ -0,0 +1,26 @@
;(function($, win, undefined) {
// ECMAScript 5 嚴格模式
'use strict';
$(document).ready(function() {
var timeout_id;
$(window).resize(function() {
window.clearTimeout(timeout_id)
if (window.innerWidth < 768) {
} else {
if($("div.aside").length == 0){
timeout_id = setTimeout(function(){
if($('.mobile-menu .modules-menu').length > 0){
$("header .container").append($('.mobile-menu .modules-menu'))
}
}, 500);
}else{
timeout_id = setTimeout(function(){
if($('.modules-menu').length > 0){
$("div.aside").eq(0).append($('.modules-menu'))
}
}, 500);
}
}
})
})
}(jQuery, window));

View File

@ -0,0 +1,26 @@
;(function($, win, undefined) {
// ECMAScript 5 嚴格模式
'use strict';
$(document).ready(function() {
var timeout_id;
$(window).resize(function() {
window.clearTimeout(timeout_id)
if (window.innerWidth < 768) {
} else {
if($("div.aside").length == 0){
timeout_id = setTimeout(function(){
if($('.mobile-menu .modules-menu').length > 0){
$("header .container").append($('.mobile-menu .modules-menu'))
}
}, 500);
}else{
timeout_id = setTimeout(function(){
if($('.modules-menu').length > 0){
$("div.aside").eq(0).append($('.modules-menu'))
}
}, 500);
}
}
})
})
}(jQuery, window));

View File

@ -0,0 +1,26 @@
;(function($, win, undefined) {
// ECMAScript 5 嚴格模式
'use strict';
$(document).ready(function() {
var timeout_id;
$(window).resize(function() {
window.clearTimeout(timeout_id)
if (window.innerWidth < 768) {
} else {
if($("div.aside").length == 0){
timeout_id = setTimeout(function(){
if($('.mobile-menu .modules-menu').length > 0){
$("header .container").append($('.mobile-menu .modules-menu'))
}
}, 500);
}else{
timeout_id = setTimeout(function(){
if($('.modules-menu').length > 0){
$("div.aside").eq(0).append($('.modules-menu'))
}
}, 500);
}
}
})
})
}(jQuery, window));

View File

@ -0,0 +1,26 @@
;(function($, win, undefined) {
// ECMAScript 5 嚴格模式
'use strict';
$(document).ready(function() {
var timeout_id;
$(window).resize(function() {
window.clearTimeout(timeout_id)
if (window.innerWidth < 768) {
} else {
if($("div.aside").length == 0){
timeout_id = setTimeout(function(){
if($('.mobile-menu .modules-menu').length > 0){
$("header .container").append($('.mobile-menu .modules-menu'))
}
}, 500);
}else{
timeout_id = setTimeout(function(){
if($('.modules-menu').length > 0){
$("div.aside").eq(0).append($('.modules-menu'))
}
}, 500);
}
}
})
})
}(jQuery, window));

View File

@ -0,0 +1,26 @@
;(function($, win, undefined) {
// ECMAScript 5 嚴格模式
'use strict';
$(document).ready(function() {
var timeout_id;
$(window).resize(function() {
window.clearTimeout(timeout_id)
if (window.innerWidth < 768) {
} else {
if($("div.aside").length == 0){
timeout_id = setTimeout(function(){
if($('.mobile-menu .modules-menu').length > 0){
$("header .container").append($('.mobile-menu .modules-menu'))
}
}, 500);
}else{
timeout_id = setTimeout(function(){
if($('.modules-menu').length > 0){
$("div.aside").eq(0).append($('.modules-menu'))
}
}, 500);
}
}
})
})
}(jQuery, window));

View File

@ -0,0 +1,26 @@
;(function($, win, undefined) {
// ECMAScript 5 嚴格模式
'use strict';
$(document).ready(function() {
var timeout_id;
$(window).resize(function() {
window.clearTimeout(timeout_id)
if (window.innerWidth < 768) {
} else {
if($("div.aside").length == 0){
timeout_id = setTimeout(function(){
if($('.mobile-menu .modules-menu').length > 0){
$("header .container").append($('.mobile-menu .modules-menu'))
}
}, 500);
}else{
timeout_id = setTimeout(function(){
if($('.modules-menu').length > 0){
$("div.aside").eq(0).append($('.modules-menu'))
}
}, 500);
}
}
})
})
}(jQuery, window));

View File

@ -0,0 +1,26 @@
;(function($, win, undefined) {
// ECMAScript 5 嚴格模式
'use strict';
$(document).ready(function() {
var timeout_id;
$(window).resize(function() {
window.clearTimeout(timeout_id)
if (window.innerWidth < 768) {
} else {
if($("div.aside").length == 0){
timeout_id = setTimeout(function(){
if($('.mobile-menu .modules-menu').length > 0){
$("header .container").append($('.mobile-menu .modules-menu'))
}
}, 500);
}else{
timeout_id = setTimeout(function(){
if($('.modules-menu').length > 0){
$("div.aside").eq(0).append($('.modules-menu'))
}
}, 500);
}
}
})
})
}(jQuery, window));

View File

@ -96,7 +96,8 @@ module CustomAnnouncement
puts ['there_was_no_show_option_method',e] puts ['there_was_no_show_option_method',e]
end end
side_bar do side_bar do
head_label_i18n 'custom_announcement.custom_announcement', icon_class: "icons-megaphone" set_sidebar_order(100) rescue nil
head_label_i18n 'custom_announcement.custom_announcement', icon_class: "icon-bullhorn"
available_for "users" available_for "users"
active_for_controllers (['admin/custom_announcements']) active_for_controllers (['admin/custom_announcements'])
head_link_path "admin_custom_announcements_path" head_link_path "admin_custom_announcements_path"

View File

@ -44,14 +44,14 @@ module CustomGallery
authorizable authorizable
frontend_enabled frontend_enabled
data_count 1..30 data_count 1..30
begin begin
show_option_items data show_option_items data
rescue => e rescue => e
puts ['there_was_no_show_option_method',e] puts ['there_was_no_show_option_method',e]
end end
side_bar do side_bar do
head_label_i18n 'custom_gallery.custom_gallery', icon_class: "icons-pictures" set_sidebar_order(100) rescue nil
head_label_i18n 'custom_gallery.custom_gallery', icon_class: "fa fa-file-image-o"
available_for "users" available_for "users"
active_for_controllers (['admin/custom_galleries','admin/images']) active_for_controllers (['admin/custom_galleries','admin/images'])
head_link_path "admin_custom_galleries_path" head_link_path "admin_custom_galleries_path"