New UI changes(tags, categories, authorisations, module index…)
To run: - ruby lib/remove_old_tags.rb DB_NAME - rake new_ui:migrate_tags - rake new_ui:migrate_categories['APP_KEY,''MODEL_NAME'] (check new_ui.rake for more details)
This commit is contained in:
1 parent
07b3857465
commit
856898016b
1495 files changed
+52132
-9876
No files matched your search
@@ -0,0 +1,60 @@
|
||||
// Search Clear
|
||||
!function ($) {
|
||||
$.fn.searchClear = function (param){
|
||||
_defaultSettings = {
|
||||
inputName: ':input',
|
||||
inputIcon: 'inputIcon',
|
||||
clearBtnIcon: 'clearBtnIcon',
|
||||
};
|
||||
_set = $.extend(_defaultSettings, param);
|
||||
$this = this;
|
||||
$input = this.find(_set.inputName);
|
||||
$tmp = '<i class="'+_set.inputIcon+'"></i><i class="'+_set.clearBtnIcon+' search-clear"></i>';
|
||||
$input.wrap('<div class="sc-field" />');
|
||||
$this.find('.sc-field').prepend($tmp);
|
||||
$searchClear = $this.find(".search-clear");
|
||||
function run(e) {
|
||||
$searchClear.hide();
|
||||
if($input.val().length > 0) {
|
||||
$searchClear.show();
|
||||
}else {
|
||||
$searchClear.hide();
|
||||
}
|
||||
$input.on("blur keyup", function(){
|
||||
if($(this).val().length > 0) {
|
||||
$searchClear.show();
|
||||
}else {
|
||||
$searchClear.hide();
|
||||
}
|
||||
});
|
||||
$searchClear.on({
|
||||
click: function(){
|
||||
$(this).hide();
|
||||
$input.val("")
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// Checking IE10
|
||||
// if Windows 8 and IE is ture. remove search clear buttom and fix text input padding-right
|
||||
if(/Windows NT 6.2/g.test(navigator.userAgent)){
|
||||
if(/MSIE/g.test(navigator.userAgent)){
|
||||
$searchClear.remove();
|
||||
$input.css({
|
||||
'padding-right': '5px',
|
||||
});
|
||||
}else{run()}
|
||||
}else{run()}
|
||||
}
|
||||
}(window.jQuery);
|
||||
|
||||
|
||||
|
||||
var $moduleWidth = 0,
|
||||
$moduleNav = $('.module-nav');
|
||||
|
||||
var navMenu = new iScroll(document.getElementsByClassName('nav-scroll')[0], {
|
||||
snap: true,
|
||||
momentum: false,
|
||||
hScrollbar: false,
|
||||
});
|
||||
Reference in new issue
Block a user