From 091ad90cd31b2b14e7ad877d262e29e5ea82cc69 Mon Sep 17 00:00:00 2001 From: Catouse Date: Fri, 8 May 2015 14:37:15 +0800 Subject: [PATCH] Revert " * update zui.sortable.js." This reverts commit 875533c100398c8224703fbed198aa55a5331d3d. --- module/common/view/sortable.html.php | 6 ---- module/product/view/index.html.php | 8 ----- module/project/view/index.html.php | 8 ----- www/js/zui/zui.sortable.js | 4 +-- www/upgrade.php | 46 ++++++++++++++++++++++++++++ 5 files changed, 48 insertions(+), 24 deletions(-) create mode 100644 www/upgrade.php diff --git a/module/common/view/sortable.html.php b/module/common/view/sortable.html.php index b71e44a02e..43ad4adc21 100644 --- a/module/common/view/sortable.html.php +++ b/module/common/view/sortable.html.php @@ -26,12 +26,6 @@ $(document).ready(function() trigger: $tbody.find('.sort-handler').length ? '.sort-handler' : null, finish: function(e) { - var orders = {}; - e.list.each(function(){ - var $this = $(this); - orders[$this.data('id')] = parseInt($this.attr('data-order')); - }); - e.orders = orders; $tbody.trigger('sort.sortable', e); var $thead = $tbody.closest('table').children('thead'); $thead.find('.headerSortDown, .headerSortUp').removeClass('headerSortDown headerSortUp').addClass('header'); diff --git a/module/product/view/index.html.php b/module/product/view/index.html.php index fbb256d5af..1088f7b276 100644 --- a/module/product/view/index.html.php +++ b/module/product/view/index.html.php @@ -36,13 +36,9 @@ recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> -<<<<<<< Updated upstream ');?> -======= - ');?> ->>>>>>> Stashed changes idAB);?> product->name);?> story->statusList['active'] . $lang->story->common;?> @@ -59,12 +55,8 @@ -<<<<<<< Updated upstream -======= - ->>>>>>> Stashed changes diff --git a/module/project/view/index.html.php b/module/project/view/index.html.php index 39fd1faa41..1f0718e130 100644 --- a/module/project/view/index.html.php +++ b/module/project/view/index.html.php @@ -30,13 +30,9 @@ recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> -<<<<<<< Updated upstream ');?> -======= - ');?> ->>>>>>> Stashed changes idAB);?> project->name);?> project->code);?> @@ -53,12 +49,8 @@ -<<<<<<< Updated upstream -======= - ->>>>>>> Stashed changes diff --git a/www/js/zui/zui.sortable.js b/www/js/zui/zui.sortable.js index 6e2e8a5b5f..30feea9e61 100644 --- a/www/js/zui/zui.sortable.js +++ b/www/js/zui/zui.sortable.js @@ -1,7 +1,7 @@ /* ======================================================================== - * ZUI: sortable (include droppable) + * ZUI: sortable.js * http://zui.sexy * ======================================================================== * Copyright (c) 2014 cnezsoft.com; Licensed MIT * ======================================================================== */ -!function(a,b,c){"use strict";var d=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.init()};d.DEFAULTS={container:"body",deviation:5,sensorOffsetX:0,sensorOffsetY:0},d.prototype.getOptions=function(b){return b=a.extend({},d.DEFAULTS,this.$.data(),b)},d.prototype.callEvent=function(b,c){return a.zui.callEvent(this.options[b],c,this)},d.prototype.init=function(){this.handleMouseEvents()},d.prototype.handleMouseEvents=function(){var d=this.$,e=this,f=this.options,g="before";this.$triggerTarget=f.trigger?(a.isFunction(f.trigger)?f.trigger(d):d.find(f.trigger)).first():d,this.$triggerTarget.on("mousedown",function(h){function v(b){var h,i,q,v,w,x,g={left:b.pageX,top:b.pageY};c.abs(g.left-r.left)h&&g.top>i&&g.lefti?g.before(f):g.after(f),j=c.children(d.selector).not(".drag-shadow"),e(j),a.zui.callEvent(d["order"],{list:j,element:f})}},finish:function(b){d.dragCssClass&&b.element&&b.element.removeClass(d.dragCssClass),a.zui.callEvent(d["finish"],{list:c.children(d.selector),element:b.element}),c.removeClass("sortable-sorting")}})},a.fn.sortable=function(b){return this.each(function(){var c=a(this),d=c.data("zui.sortable"),f="object"==typeof b&&b;d?"object"==typeof b&&d.reset():c.data("zui.sortable",d=new e(this,f)),"string"==typeof b&&d[b]()})},a.fn.sortable.Constructor=e}(jQuery,window,document,Math); +!function(a,b,c){"use strict";var d=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.init()};d.DEFAULTS={container:"body",deviation:5,sensorOffsetX:0,sensorOffsetY:0},d.prototype.getOptions=function(b){return b=a.extend({},d.DEFAULTS,this.$.data(),b)},d.prototype.callEvent=function(b,c){return a.zui.callEvent(this.options[b],c,this)},d.prototype.init=function(){this.handleMouseEvents()},d.prototype.handleMouseEvents=function(){var d=this.$,e=this,f=this.options,g="before";this.$triggerTarget=f.trigger?(a.isFunction(f.trigger)?f.trigger(d):d.find(f.trigger)).first():d,this.$triggerTarget.on("mousedown",function(h){function v(b){var h,i,q,v,w,x,g={left:b.pageX,top:b.pageY};c.abs(g.left-r.left)h&&g.top>i&&g.lefti?g.before(f):g.after(f),j=c.children(d.selector),e(j),a.zui.callEvent(d["order"],{list:j,element:f})}},finish:function(b){d.dragCssClass&&b.element&&b.element.removeClass(d.dragCssClass),a.zui.callEvent(d["finish"],{list:c.children(d.selector),element:b.element}),c.removeClass("sortable-sorting")}})},a.fn.sortable=function(b){return this.each(function(){var c=a(this),d=c.data("zui.sortable"),f="object"==typeof b&&b;d?"object"==typeof b&&d.reset():c.data("zui.sortable",d=new e(this,f)),"string"==typeof b&&d[b]()})},a.fn.sortable.Constructor=e}(jQuery,window,document,Math); diff --git a/www/upgrade.php b/www/upgrade.php new file mode 100644 index 0000000000..4028dc3686 --- /dev/null +++ b/www/upgrade.php @@ -0,0 +1,46 @@ + + * @package ZenTaoPMS + * @version $Id: upgrade.php 4677 2013-04-26 06:23:58Z chencongzhi520@gmail.com $ + * @link http://www.zentao.net + */ +/* Judge my.php exists or not. */ +define('IN_UPGRADE', true); +$myConfig = dirname(dirname(__FILE__)) . '/config/my.php'; +if(!file_exists($myConfig)) +{ + echo "文件" . $myConfig . "不存在! 提示:不要重命名原来的禅道安装目录,下载最新的源码包,覆盖即可。" . "
"; + echo $myConfig . " doesn't exists! Please don't rename zentao before overriding the source code!"; + exit; +} + +error_reporting(0); + +/* Load the framework. */ +include '../framework/router.class.php'; +include '../framework/control.class.php'; +include '../framework/model.class.php'; +include '../framework/helper.class.php'; + +/* Instance the app. */ +$app = router::createApp('pms', dirname(dirname(__FILE__))); +$common = $app->loadCommon(); + +/* Reset the config params to make sure the install program will be lauched. */ +$config->set('requestType', 'GET'); +$config->set('default.module', 'upgrade'); +$app->setDebug(); + +/* Check the installed version is the latest or not. */ +$config->installedVersion = $common->loadModel('setting')->getVersion(); +if(version_compare($config->version, $config->installedVersion) <= 0) die(header('location: index.php')); + +/* Run it. */ +$app->parseRequest(); +$common->checkUpgradeStatus(); +$app->loadModule();