From aa5e5f9cc08cc577a092d517799ccbd2e2d2fdf9 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Thu, 29 Aug 2013 04:00:43 +0800 Subject: [PATCH] fixed bootbox3 issue in categories --- public/css/admin.less | 4 ++++ public/src/forum/admin/categories.js | 14 ++++++++------ public/templates/admin/categories.tpl | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/public/css/admin.less b/public/css/admin.less index 0afc3011d9..a3b4616261 100644 --- a/public/css/admin.less +++ b/public/css/admin.less @@ -153,3 +153,7 @@ } } +.fa-icons .col-md-3 { + padding-left: 0; + padding-right: 0; +} \ No newline at end of file diff --git a/public/src/forum/admin/categories.js b/public/src/forum/admin/categories.js index b7f77c8dbb..959dabfcfa 100644 --- a/public/src/forum/admin/categories.js +++ b/public/src/forum/admin/categories.js @@ -29,10 +29,12 @@ function select_icon(el) { } }); - jQuery('.bootbox .span3').on('click', function() { - jQuery('.bootbox .selected').removeClass('selected'); - jQuery(this).addClass('selected'); - }); + setTimeout(function() { //bootbox was rewritten for BS3 and I had to add this timeout for the previous code to work. TODO: to look into + jQuery('.bootbox .col-md-3').on('click', function() { + jQuery('.bootbox .selected').removeClass('selected'); + jQuery(this).addClass('selected'); + }); + }, 500); } @@ -46,7 +48,7 @@ jQuery('.blockclass').each(function() { }); -//DRY Failure. this needs to go into an ajaxify onready style fn. Currently is copy pasted into every single function so after ACP is off the ground fix asap +//DRY Failure. this needs to go into an ajaxify onready style fn. Currently is copy pasted into every single function so after ACP is off the ground fix asap (function() { jQuery('document').ready(function() { var url = window.location.href, @@ -99,5 +101,5 @@ jQuery('.blockclass').each(function() { }); }); - + }()); \ No newline at end of file diff --git a/public/templates/admin/categories.tpl b/public/templates/admin/categories.tpl index 6c4220be59..3dfdc6fd33 100644 --- a/public/templates/admin/categories.tpl +++ b/public/templates/admin/categories.tpl @@ -36,7 +36,7 @@ -