From 04ef8388972a9584da535afbd39b11a115b63f19 Mon Sep 17 00:00:00 2001 From: Catouse Date: Wed, 23 May 2018 10:02:42 +0800 Subject: [PATCH] * refactor export modal trigger. --- module/git/model.php | 4 +- module/project/view/bug.html.php | 2 +- module/svn/model.php | 4 +- www/js/my.full.js | 70 ++++++++++++++++---------------- www/js/zui/min.js | 6 +-- www/theme/zui/css/min.css | 4 +- 6 files changed, 45 insertions(+), 45 deletions(-) diff --git a/module/git/model.php b/module/git/model.php index 46b1d40502..f92682592a 100644 --- a/module/git/model.php +++ b/module/git/model.php @@ -643,8 +643,8 @@ class gitModel extends model { foreach($actionFiles as $file) { - $catLink = trim(html::a($this->buildURL('cat', $repoRoot . $file, $log->revision), 'view', '', "class='repolink'")); - $diffLink = trim(html::a($this->buildURL('diff', $repoRoot . $file, $log->revision), 'diff', '', "class='repolink'")); + $catLink = trim(html::a($this->buildURL('cat', $repoRoot . $file, $log->revision), 'view', '', "class='iframe' data-width='960'")); + $diffLink = trim(html::a($this->buildURL('diff', $repoRoot . $file, $log->revision), 'diff', '', "class='iframe' data-width='960'")); $diff .= $action . " " . $file . " $catLink "; $diff .= $action == 'M' ? "$diffLink\n" : "\n" ; } diff --git a/module/project/view/bug.html.php b/module/project/view/bug.html.php index 626002d2a2..cf20538dac 100644 --- a/module/project/view/bug.html.php +++ b/module/project/view/bug.html.php @@ -21,7 +21,7 @@ bug->search;?>
- " . $lang->bug->export, '', "class='btn btn-link export iframe'");?> + " . $lang->bug->export, '', "class='btn btn-link export'");?> id", " " . $lang->bug->create, '', "class='btn btn-primary'");?>
diff --git a/module/svn/model.php b/module/svn/model.php index 1d8c2d8469..0aa57d1776 100644 --- a/module/svn/model.php +++ b/module/svn/model.php @@ -611,8 +611,8 @@ class svnModel extends model { foreach($actionFiles as $file) { - $catLink = trim(html::a($this->buildURL('cat', $repoRoot . $file, $log->revision), 'view', '', "class='repolink'")); - $diffLink = trim(html::a($this->buildURL('diff', $repoRoot . $file, $log->revision), 'diff', '', "class='repolink'")); + $catLink = trim(html::a($this->buildURL('cat', $repoRoot . $file, $log->revision), 'view', '', "class='iframe' data-width='960'")); + $diffLink = trim(html::a($this->buildURL('diff', $repoRoot . $file, $log->revision), 'diff', '', "class='iframe' data-width='960'")); $diff .= $action . " " . $file . " $catLink "; $diff .= $action == 'M' ? "$diffLink\n" : "\n" ; } diff --git a/www/js/my.full.js b/www/js/my.full.js index b15a872e81..b8b71efacd 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -456,17 +456,17 @@ function setImageSize(image, maxWidth) $(image).wrap(''); } -/** - * Set the modal trigger to link. - * - * @access public - * @return void - */ -function setModalTriggerLink() -{ - $('.repolink').modalTrigger({width:960, type:'iframe'}); - $('.export').modalTrigger({width:800, type:'iframe', afterShown: setCheckedCookie}); -} +// /** +// * Set the modal trigger to link. +// * +// * @access public +// * @return void +// */ +// function setModalTriggerLink() +// { +// $('.repolink').modalTrigger({width:960, type:'iframe'}); +// $('.export').modalTrigger({width:800, type:'iframe', afterShown: setCheckedCookie}); +// } /** * Set mailto list from a contact list.. @@ -925,29 +925,29 @@ function setModal4List(triggerClass, replaceID, callback, width) }); } -/** - * Set checked in cookie. - * - * @access public - * @return void - */ -function setCheckedCookie() -{ - var checkeds = ''; - $(':checkbox').each(function() - { - if($(this).attr('checked')) - { - if(!isNaN($(this).val())) - { - var checkedVal = parseInt($(this).val()); - if(checkedVal != 0) checkeds = checkeds + checkedVal + ','; - } - } - }) - if(checkeds != '') checkeds = checkeds.substring(0, checkeds.length - 1); - $.cookie('checkedItem', checkeds, {expires:config.cookieLife, path:config.webRoot}); -} +// /** +// * Set checked in cookie. +// * +// * @access public +// * @return void +// */ +// function setCheckedCookie() +// { +// var checkeds = ''; +// $(':checkbox').each(function() +// { +// if($(this).attr('checked')) +// { +// if(!isNaN($(this).val())) +// { +// var checkedVal = parseInt($(this).val()); +// if(checkedVal != 0) checkeds = checkeds + checkedVal + ','; +// } +// } +// }) +// if(checkeds != '') checkeds = checkeds.substring(0, checkeds.length - 1); +// $.cookie('checkedItem', checkeds, {expires:config.cookieLife, path:config.webRoot}); +// } /** * Set table behavior @@ -1632,7 +1632,7 @@ $(document).ready(function() //setRequiredFields(); setPlaceholder(); - setModalTriggerLink(); + // setModalTriggerLink(); // checkTable(); // toggleSearch(); diff --git a/www/js/zui/min.js b/www/js/zui/min.js index a6aef2bada..3081dbf760 100644 --- a/www/js/zui/min.js +++ b/www/js/zui/min.js @@ -1,5 +1,5 @@ /*! - * ZUI: Zentao template - v1.8.1 - 2018-05-22 + * ZUI: Zentao template - v1.8.1 - 2018-05-23 * http://zui.sexy * GitHub: https://github.com/easysoft/zui.git * Copyright (c) 2018 cnezsoft.com; Licensed MIT @@ -74,5 +74,5 @@ if(!t.fn.droppable)return void console.error("Sortable requires droppable.js");v * Original idea by: * 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,n=e.data.toLowerCase().split(" ");e.handler=function(e){if(this===e.target||!/textarea|select/i.test(e.target.nodeName)&&"text"!==e.target.type){var s="keypress"!==e.type&&t.hotkeys.specialKeys[e.which],o=String.fromCharCode(e.which).toLowerCase(),a="",r={};e.altKey&&"alt"!==s&&(a+="alt+"),e.ctrlKey&&"ctrl"!==s&&(a+="ctrl+"),e.metaKey&&!e.ctrlKey&&"meta"!==s&&(a+="meta+"),e.shiftKey&&"shift"!==s&&(a+="shift+"),s?r[a+s]=!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=n.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 n;return t.isArray(e)&&(n={},t.each(e,function(e,i){t.isPlainObject(i)?n[i.action]=i:n[i]=!0}),e=n),t.isPlainObject(e)&&(n={},t.each(e,function(e,i){i?n[e]=t.extend({type:e},a[e],t.isPlainObject(i)?i:null):n[e]=!1}),e=n),i?t.extend(!0,{},i,e):e}function i(e,i,n){return i=i||e.type,t(n||e.template).addClass("tree-action").attr(t.extend({"data-type":i,title:e.title||""},e.attr)).data("action",e)}var n="zui.tree",s=0,o=function(e,i){this.name=n,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,n,s,o){var a,r=t(e),l=this.options;if(r.is("li")?(a=r.children("ul"),a.length||(a=t("