From b9aa9568c5b3c9d60c2aba72f3495684214cb6df Mon Sep 17 00:00:00 2001 From: Catouse Date: Thu, 17 May 2018 13:26:27 +0800 Subject: [PATCH] * improve UI of forms elements. --- module/task/view/create.html.php | 38 ++++++++++++++++---------------- module/todo/js/common.js | 4 ++-- module/todo/view/create.html.php | 4 ++-- www/js/zui/min.js | 2 +- www/theme/zui/css/min.css | 2 +- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/module/task/view/create.html.php b/module/task/view/create.html.php index a96ae4d545..237f9f06af 100644 --- a/module/task/view/create.html.php +++ b/module/task/view/create.html.php @@ -85,26 +85,26 @@ task->pri;?> - - task->priList as $priKey => $priValue) - { - if(!empty($priKey) and (string)$priKey != (string)$priValue) - { - $hasCustomPri = true; - break; - } - } - $priList = $lang->task->priList; - if(end($priList)) - { - unset($priList[0]); - $priList[0] = ''; - } - ?> + task->priList as $priKey => $priValue) + { + if(!empty($priKey) and (string)$priKey != (string)$priValue) + { + $hasCustomPri = true; + break; + } + } + $priList = $lang->task->priList; + if(end($priList)) + { + unset($priList[0]); + $priList[0] = ''; + } + ?> + - pri, "class='form-control chosen'");?> + pri, "class='form-control chosen chosen-simple'");?> pri, "class='form-control' data-provide='labelSelector'");?> diff --git a/module/todo/js/common.js b/module/todo/js/common.js index 1e332fe889..a257b67cb8 100644 --- a/module/todo/js/common.js +++ b/module/todo/js/common.js @@ -44,12 +44,12 @@ function loadList(type, id) { if(data != ' ') { - $(divClass).html(data); + $(divClass).html(data).find('select').chosen(); } else { $("#type").val("custom"); - $(divClass).html(""); + $(divClass).html("").find('select').chosen(); } }); } diff --git a/module/todo/view/create.html.php b/module/todo/view/create.html.php index 0e84596c9a..de6352aeaa 100644 --- a/module/todo/view/create.html.php +++ b/module/todo/view/create.html.php @@ -86,11 +86,11 @@ todo->type;?> - todo->typeList, '', 'onchange=loadList(this.value); class=form-control');?> + todo->typeList, '', 'onchange="loadList(this.value);" class="form-control chosen-simple"');?> todo->pri;?> - todo->priList, '', "class='form-control chosen'");?> + todo->priList, '', "class='form-control chosen-simple'");?> todo->name;?> diff --git a/www/js/zui/min.js b/www/js/zui/min.js index 0a864e9d50..d962ac8de2 100644 --- a/www/js/zui/min.js +++ b/www/js/zui/min.js @@ -75,4 +75,4 @@ function(){var t,e,i,s,n,o={}.hasOwnProperty,a=function(t,e){function i(){this.c * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/ */ function(t){function e(e){if("string"==typeof e.data){var i=e.handler,s=e.data.toLowerCase().split(" ");e.handler=function(e){if(this===e.target||!/textarea|select/i.test(e.target.nodeName)&&"text"!==e.target.type){var n="keypress"!==e.type&&t.hotkeys.specialKeys[e.which],o=String.fromCharCode(e.which).toLowerCase(),a="",r={};e.altKey&&"alt"!==n&&(a+="alt+"),e.ctrlKey&&"ctrl"!==n&&(a+="ctrl+"),e.metaKey&&!e.ctrlKey&&"meta"!==n&&(a+="meta+"),e.shiftKey&&"shift"!==n&&(a+="shift+"),n?r[a+n]=!0:(r[a+o]=!0,r[a+t.hotkeys.shiftNums[o]]=!0,"shift+"===a&&(r[t.hotkeys.shiftNums[o]]=!0));for(var l=0,h=s.length;l","/":"?","\\":"|"}},t.each(["keydown","keyup","keypress"],function(){t.event.special[this]={add:e}})}(jQuery),function(t){"use strict";function e(e,i){if(e===!1)return e;if(!e)return i;e===!0?e={add:!0,"delete":!0,edit:!0,sort:!0}:"string"==typeof e&&(e=e.split(","));var s;return t.isArray(e)&&(s={},t.each(e,function(e,i){t.isPlainObject(i)?s[i.action]=i:s[i]=!0}),e=s),t.isPlainObject(e)&&(s={},t.each(e,function(e,i){i?s[e]=t.extend({type:e},a[e],t.isPlainObject(i)?i:null):s[e]=!1}),e=s),i?t.extend(!0,{},i,e):e}function i(e,i,s){return i=i||e.type,t(s||e.template).addClass("tree-action").attr(t.extend({"data-type":i,title:e.title||""},e.attr)).data("action",e)}var s="zui.tree",n=0,o=function(e,i){this.name=s,this.$=t(e),this.getOptions(i),this._init()},a={sort:{template:''},add:{template:''},edit:{template:''},"delete":{template:''}};o.DEFAULTS={animate:null,initialState:"normal",toggleTemplate:''},o.prototype.add=function(e,i,s,n,o){var a,r=t(e),l=this.options;if(r.is("li")?(a=r.children("ul"),a.length||(a=t("