diff --git a/setup/migrate/config/config.xml b/setup/migrate/config/config.xml index 1959289..7e1c62a 100644 --- a/setup/migrate/config/config.xml +++ b/setup/migrate/config/config.xml @@ -9,7 +9,6 @@ - welcome installation services database diff --git a/setup/migrate/config/databases.xml b/setup/migrate/config/databases.xml deleted file mode 100644 index 8f08518..0000000 --- a/setup/migrate/config/databases.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - mysql - - localhost - 3306 - dms - root - dmsadminuser - js9281djw - dmsuser - djw9281js - diff --git a/setup/migrate/lib/helpers/phpinfo.php b/setup/migrate/lib/helpers/phpinfo.php deleted file mode 100644 index ccddb96..0000000 --- a/setup/migrate/lib/helpers/phpinfo.php +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/setup/migrate/migrateUtil.php b/setup/migrate/migrateUtil.php index 4c42972..5da4018 100644 --- a/setup/migrate/migrateUtil.php +++ b/setup/migrate/migrateUtil.php @@ -156,7 +156,6 @@ class MigrateUtil { { return $this->bootstrap->absoluteURI($url = null, $protocol = null, $port = null); } - /** * Portably execute a command on any of the supported platforms. diff --git a/setup/migrate/migrateWizard.php b/setup/migrate/migrateWizard.php index 0e56ed8..bfb2fdd 100644 --- a/setup/migrate/migrateWizard.php +++ b/setup/migrate/migrateWizard.php @@ -49,14 +49,17 @@ include("../wizard/path.php"); // Paths */ function __autoload($class) { // Attempt and autoload classes $class = strtolower(substr($class,0,1)).substr($class,1); // Linux Systems. + if ($class == "template") { // Load existing templating classes + require_once("../wizard/template.php"); + require_once("../wizard/lib/helpers/htmlHelper.php"); + return ; + } if(file_exists(WIZARD_DIR."$class.php")) { require_once(WIZARD_DIR."$class.php"); } elseif (file_exists(STEP_DIR."$class.php")) { require_once(STEP_DIR."$class.php"); } elseif (file_exists(WIZARD_LIB."$class.php")) { require_once(WIZARD_LIB."$class.php"); - } elseif (file_exists(SERVICE_LIB."$class.php")) { - require_once(SERVICE_LIB."$class.php"); } else { return null; } diff --git a/setup/migrate/migrater.php b/setup/migrate/migrater.php index 4c8fd81..23a8c84 100644 --- a/setup/migrate/migrater.php +++ b/setup/migrate/migrater.php @@ -188,7 +188,7 @@ class Migrater { */ private function _firstStepPeriod() { if(isset($_GET['step_name'])) { - if($_GET['step_name'] != 'welcome') + if($_GET['step_name'] != 'installation') return false; } @@ -510,9 +510,6 @@ class Migrater { } elseif (isset($_POST['BInstall'])) { $this->migraterAction = 'binstall'; $this->response = 'binstall'; -// } elseif (isset($_POST['Backup'])) { -// $this->migraterAction = 'backup'; -// $this->response = 'backup'; } else { $this->response = ''; $this->migraterAction = ''; @@ -558,11 +555,6 @@ class Migrater { $iutil = new MigrateUtil(); $iutil->redirect('../wizard/index.php?step_name=dependencies'); break; -// case 'backup': -// $iutil = new MigrateUtil(); -// $iutil->redirect('../upgrade/index.php?step_name=backup'); -// $iutil->redirect("..".DS."upgrade".DS."index.php?step_name=backup"); -// break; default: // TODO : handle silent $this->_landing(); diff --git a/setup/migrate/resources/form.js b/setup/migrate/resources/form.js deleted file mode 100644 index 7e1815b..0000000 --- a/setup/migrate/resources/form.js +++ /dev/null @@ -1,13 +0,0 @@ -$(document).ready(function() { - var options = {target: '#content_container', beforeSubmit: w.showRequest, success: w.showResponse}; - $.blockUI.defaults.css = {}; - var override = $('form').attr('onsubmit'); - if(override == undefined) { - $('form').ajaxForm(options); - w.adjustMenu($('form').attr('id')); - } else { - var options = {target: '#content_container', beforeSubmit: w.validateRegistration, success: w.adjustMenu($('form').attr('id'))}; - $('form').ajaxForm(options); - } -}); - diff --git a/setup/migrate/resources/graphics/active.png b/setup/migrate/resources/graphics/active.png deleted file mode 100755 index 62b232c..0000000 --- a/setup/migrate/resources/graphics/active.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/background.gif b/setup/migrate/resources/graphics/background.gif deleted file mode 100755 index d8039fb..0000000 --- a/setup/migrate/resources/graphics/background.gif +++ /dev/null diff --git a/setup/migrate/resources/graphics/big-ok.png b/setup/migrate/resources/graphics/big-ok.png deleted file mode 100755 index 62c9046..0000000 --- a/setup/migrate/resources/graphics/big-ok.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/cross.png b/setup/migrate/resources/graphics/cross.png deleted file mode 100755 index 3ba9615..0000000 --- a/setup/migrate/resources/graphics/cross.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/cross_orange.png b/setup/migrate/resources/graphics/cross_orange.png deleted file mode 100755 index cb02cd5..0000000 --- a/setup/migrate/resources/graphics/cross_orange.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/dame/dot.png b/setup/migrate/resources/graphics/dame/dot.png deleted file mode 100755 index 0365307..0000000 --- a/setup/migrate/resources/graphics/dame/dot.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/dame/finish.png b/setup/migrate/resources/graphics/dame/finish.png deleted file mode 100755 index 6176f6e..0000000 --- a/setup/migrate/resources/graphics/dame/finish.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/dame/gradiant.gif b/setup/migrate/resources/graphics/dame/gradiant.gif deleted file mode 100755 index 019998d..0000000 --- a/setup/migrate/resources/graphics/dame/gradiant.gif +++ /dev/null diff --git a/setup/migrate/resources/graphics/dame/kt_gradient.jpg b/setup/migrate/resources/graphics/dame/kt_gradient.jpg deleted file mode 100755 index e5c3b5b..0000000 --- a/setup/migrate/resources/graphics/dame/kt_gradient.jpg +++ /dev/null diff --git a/setup/migrate/resources/graphics/dame/loginbg.png b/setup/migrate/resources/graphics/dame/loginbg.png deleted file mode 100755 index 02c3ad7..0000000 --- a/setup/migrate/resources/graphics/dame/loginbg.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/dame/migrater-header_logo.png b/setup/migrate/resources/graphics/dame/migrater-header_logo.png deleted file mode 100755 index c5d8e7d..0000000 --- a/setup/migrate/resources/graphics/dame/migrater-header_logo.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/dame/migrater_head.png b/setup/migrate/resources/graphics/dame/migrater_head.png deleted file mode 100755 index dcd92ac..0000000 --- a/setup/migrate/resources/graphics/dame/migrater_head.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/dame/navbar.png b/setup/migrate/resources/graphics/dame/navbar.png deleted file mode 100755 index c29b192..0000000 --- a/setup/migrate/resources/graphics/dame/navbar.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/dame/powered-by-kt.png b/setup/migrate/resources/graphics/dame/powered-by-kt.png deleted file mode 100755 index 0526fd8..0000000 --- a/setup/migrate/resources/graphics/dame/powered-by-kt.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/dame/tick1.png b/setup/migrate/resources/graphics/dame/tick1.png deleted file mode 100755 index 2df208f..0000000 --- a/setup/migrate/resources/graphics/dame/tick1.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/dame/tick2.png b/setup/migrate/resources/graphics/dame/tick2.png deleted file mode 100755 index 979f834..0000000 --- a/setup/migrate/resources/graphics/dame/tick2.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/dropbox.png b/setup/migrate/resources/graphics/dropbox.png deleted file mode 100755 index af538e5..0000000 --- a/setup/migrate/resources/graphics/dropbox.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/dropbox_old.png b/setup/migrate/resources/graphics/dropbox_old.png deleted file mode 100755 index 6958c3c..0000000 --- a/setup/migrate/resources/graphics/dropbox_old.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/footer.png b/setup/migrate/resources/graphics/footer.png deleted file mode 100755 index 6486da9..0000000 --- a/setup/migrate/resources/graphics/footer.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/gradient.png b/setup/migrate/resources/graphics/gradient.png deleted file mode 100755 index 6074bca..0000000 --- a/setup/migrate/resources/graphics/gradient.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/inactive.png b/setup/migrate/resources/graphics/inactive.png deleted file mode 100755 index dfe29a2..0000000 --- a/setup/migrate/resources/graphics/inactive.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/indicator.png b/setup/migrate/resources/graphics/indicator.png deleted file mode 100755 index 89dbff0..0000000 --- a/setup/migrate/resources/graphics/indicator.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/kt_browse.png b/setup/migrate/resources/graphics/kt_browse.png deleted file mode 100755 index 048cd6c..0000000 --- a/setup/migrate/resources/graphics/kt_browse.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/left.png b/setup/migrate/resources/graphics/left.png deleted file mode 100755 index b74fcf7..0000000 --- a/setup/migrate/resources/graphics/left.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/logo.png b/setup/migrate/resources/graphics/logo.png deleted file mode 100755 index bfeefd8..0000000 --- a/setup/migrate/resources/graphics/logo.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/powered-by-kt.png b/setup/migrate/resources/graphics/powered-by-kt.png deleted file mode 100755 index 2bc078b..0000000 --- a/setup/migrate/resources/graphics/powered-by-kt.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/question.gif b/setup/migrate/resources/graphics/question.gif deleted file mode 100755 index 390a7fc..0000000 --- a/setup/migrate/resources/graphics/question.gif +++ /dev/null diff --git a/setup/migrate/resources/graphics/tick.png b/setup/migrate/resources/graphics/tick.png deleted file mode 100755 index a24d605..0000000 --- a/setup/migrate/resources/graphics/tick.png +++ /dev/null diff --git a/setup/migrate/resources/graphics/tree.jpg b/setup/migrate/resources/graphics/tree.jpg deleted file mode 100755 index d9e11f6..0000000 --- a/setup/migrate/resources/graphics/tree.jpg +++ /dev/null diff --git a/setup/migrate/resources/jquery.blockUI.js b/setup/migrate/resources/jquery.blockUI.js deleted file mode 100644 index 3a50783..0000000 --- a/setup/migrate/resources/jquery.blockUI.js +++ /dev/null @@ -1,463 +0,0 @@ -/*! - * jQuery blockUI plugin - * Version 2.26 (09-SEP-2009) - * @requires jQuery v1.2.3 or later - * - * Examples at: http://malsup.com/jquery/block/ - * Copyright (c) 2007-2008 M. Alsup - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - * - * Thanks to Amir-Hossein Sobhi for some excellent contributions! - */ - -;(function($) { - -if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1/.test($.fn.jquery)) { - alert('blockUI requires jQuery v1.2.3 or later! You are using v' + $.fn.jquery); - return; -} - -$.fn._fadeIn = $.fn.fadeIn; - -// this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle -// retarded userAgent strings on Vista) -var mode = document.documentMode || 0; -var setExpr = $.browser.msie && (($.browser.version < 8 && !mode) || mode < 8); -var ie6 = $.browser.msie && /MSIE 6.0/.test(navigator.userAgent) && !mode; - -// global $ methods for blocking/unblocking the entire page -$.blockUI = function(opts) { install(window, opts); }; -$.unblockUI = function(opts) { remove(window, opts); }; - -// convenience method for quick growl-like notifications (http://www.google.com/search?q=growl) -$.growlUI = function(title, message, timeout, onClose) { - var $m = $('
'); - if (title) $m.append('

'+title+'

'); - if (message) $m.append('

'+message+'

'); - if (timeout == undefined) timeout = 3000; - $.blockUI({ - message: $m, fadeIn: 700, fadeOut: 1000, centerY: false, - timeout: timeout, showOverlay: false, - onUnblock: onClose, - css: $.blockUI.defaults.growlCSS - }); -}; - -// plugin method for blocking element content -$.fn.block = function(opts) { - return this.unblock({ fadeOut: 0 }).each(function() { - if ($.css(this,'position') == 'static') - this.style.position = 'relative'; - if ($.browser.msie) - this.style.zoom = 1; // force 'hasLayout' - install(this, opts); - }); -}; - -// plugin method for unblocking element content -$.fn.unblock = function(opts) { - return this.each(function() { - remove(this, opts); - }); -}; - -$.blockUI.version = 2.26; // 2nd generation blocking at no extra cost! - -// override these in your code to change the default behavior and style -$.blockUI.defaults = { - // message displayed when blocking (use null for no message) - message: '

Please wait...

', - - title: null, // title string; only used when theme == true - draggable: true, // only used when theme == true (requires jquery-ui.js to be loaded) - - theme: false, // set to true to use with jQuery UI themes - - // styles for the message when blocking; if you wish to disable - // these and use an external stylesheet then do this in your code: - // $.blockUI.defaults.css = {}; - css: { - padding: 0, - margin: 0, - width: '30%', - top: '40%', - left: '35%', - textAlign: 'center', - color: '#000', - border: '3px solid #aaa', - backgroundColor:'#fff', - cursor: 'wait' - }, - - // minimal style set used when themes are used - themedCSS: { - width: '30%', - top: '40%', - left: '35%' - }, - - // styles for the overlay - overlayCSS: { - backgroundColor: '#000', - opacity: 0.6, - cursor: 'wait' - }, - - // styles applied when using $.growlUI - growlCSS: { - width: '350px', - top: '10px', - left: '', - right: '10px', - border: 'none', - padding: '5px', - opacity: 0.6, - cursor: 'default', - color: '#fff', - backgroundColor: '#000', - '-webkit-border-radius': '10px', - '-moz-border-radius': '10px' - }, - - // IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w - // (hat tip to Jorge H. N. de Vasconcelos) - iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank', - - // force usage of iframe in non-IE browsers (handy for blocking applets) - forceIframe: false, - - // z-index for the blocking overlay - baseZ: 1000, - - // set these to true to have the message automatically centered - centerX: true, // <-- only effects element blocking (page block controlled via css above) - centerY: true, - - // allow body element to be stetched in ie6; this makes blocking look better - // on "short" pages. disable if you wish to prevent changes to the body height - allowBodyStretch: true, - - // enable if you want key and mouse events to be disabled for content that is blocked - bindEvents: true, - - // be default blockUI will supress tab navigation from leaving blocking content - // (if bindEvents is true) - constrainTabKey: true, - - // fadeIn time in millis; set to 0 to disable fadeIn on block - fadeIn: 200, - - // fadeOut time in millis; set to 0 to disable fadeOut on unblock - fadeOut: 400, - - // time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock - timeout: 0, - - // disable if you don't want to show the overlay - showOverlay: true, - - // if true, focus will be placed in the first available input field when - // page blocking - focusInput: true, - - // suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity) - applyPlatformOpacityRules: true, - - // callback method invoked when unblocking has completed; the callback is - // passed the element that has been unblocked (which is the window object for page - // blocks) and the options that were passed to the unblock call: - // onUnblock(element, options) - onUnblock: null, - - // don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493 - quirksmodeOffsetHack: 4 -}; - -// private data and functions follow... - -var pageBlock = null; -var pageBlockEls = []; - -function install(el, opts) { - var full = (el == window); - var msg = opts && opts.message !== undefined ? opts.message : undefined; - opts = $.extend({}, $.blockUI.defaults, opts || {}); - opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {}); - var css = $.extend({}, $.blockUI.defaults.css, opts.css || {}); - var themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {}); - msg = msg === undefined ? opts.message : msg; - - // remove the current block (if there is one) - if (full && pageBlock) - remove(window, {fadeOut:0}); - - // if an existing element is being used as the blocking content then we capture - // its current place in the DOM (and current display style) so we can restore - // it when we unblock - if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) { - var node = msg.jquery ? msg[0] : msg; - var data = {}; - $(el).data('blockUI.history', data); - data.el = node; - data.parent = node.parentNode; - data.display = node.style.display; - data.position = node.style.position; - if (data.parent) - data.parent.removeChild(node); - } - - var z = opts.baseZ; - - // blockUI uses 3 layers for blocking, for simplicity they are all used on every platform; - // layer1 is the iframe layer which is used to supress bleed through of underlying content - // layer2 is the overlay layer which has opacity and a wait cursor (by default) - // layer3 is the message content that is displayed while blocking - - var lyr1 = ($.browser.msie || opts.forceIframe) - ? $('') - : $(''); - var lyr2 = $(''); - - var lyr3; - if (opts.theme && full) { - var s = ''; - lyr3 = $(s); - } - else { - lyr3 = full ? $('') - : $(''); - } - - // if we have a message, style it - if (msg) { - if (opts.theme) { - lyr3.css(themedCSS); - lyr3.addClass('ui-widget-content'); - } - else - lyr3.css(css); - } - - // style the overlay - if (!opts.applyPlatformOpacityRules || !($.browser.mozilla && /Linux/.test(navigator.platform))) - lyr2.css(opts.overlayCSS); - lyr2.css('position', full ? 'fixed' : 'absolute'); - - // make iframe layer transparent in IE - if ($.browser.msie || opts.forceIframe) - lyr1.css('opacity',0.0); - - $([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el); - - if (opts.theme && opts.draggable && $.fn.draggable) { - lyr3.draggable({ - handle: '.ui-dialog-titlebar', - cancel: 'li' - }); - } - - // ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling) - var expr = setExpr && (!$.boxModel || $('object,embed', full ? null : el).length > 0); - if (ie6 || expr) { - // give body 100% height - if (full && opts.allowBodyStretch && $.boxModel) - $('html,body').css('height','100%'); - - // fix ie6 issue when blocked element has a border width - if ((ie6 || !$.boxModel) && !full) { - var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth'); - var fixT = t ? '(0 - '+t+')' : 0; - var fixL = l ? '(0 - '+l+')' : 0; - } - - // simulate fixed position - $.each([lyr1,lyr2,lyr3], function(i,o) { - var s = o[0].style; - s.position = 'absolute'; - if (i < 2) { - full ? s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"') - : s.setExpression('height','this.parentNode.offsetHeight + "px"'); - full ? s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"') - : s.setExpression('width','this.parentNode.offsetWidth + "px"'); - if (fixL) s.setExpression('left', fixL); - if (fixT) s.setExpression('top', fixT); - } - else if (opts.centerY) { - if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'); - s.marginTop = 0; - } - else if (!opts.centerY && full) { - var top = (opts.css && opts.css.top) ? parseInt(opts.css.top) : 0; - var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"'; - s.setExpression('top',expression); - } - }); - } - - // show the message - if (msg) { - if (opts.theme) - lyr3.find('.ui-widget-content').append(msg); - else - lyr3.append(msg); - if (msg.jquery || msg.nodeType) - $(msg).show(); - } - - if (($.browser.msie || opts.forceIframe) && opts.showOverlay) - lyr1.show(); // opacity is zero - if (opts.fadeIn) { - if (opts.showOverlay) - lyr2._fadeIn(opts.fadeIn); - if (msg) - lyr3.fadeIn(opts.fadeIn); - } - else { - if (opts.showOverlay) - lyr2.show(); - if (msg) - lyr3.show(); - } - - // bind key and mouse events - bind(1, el, opts); - - if (full) { - pageBlock = lyr3[0]; - pageBlockEls = $(':input:enabled:visible',pageBlock); - if (opts.focusInput) - setTimeout(focus, 20); - } - else - center(lyr3[0], opts.centerX, opts.centerY); - - if (opts.timeout) { - // auto-unblock - var to = setTimeout(function() { - full ? $.unblockUI(opts) : $(el).unblock(opts); - }, opts.timeout); - $(el).data('blockUI.timeout', to); - } -}; - -// remove the block -function remove(el, opts) { - var full = (el == window); - var $el = $(el); - var data = $el.data('blockUI.history'); - var to = $el.data('blockUI.timeout'); - if (to) { - clearTimeout(to); - $el.removeData('blockUI.timeout'); - } - opts = $.extend({}, $.blockUI.defaults, opts || {}); - bind(0, el, opts); // unbind events - - var els; - if (full) // crazy selector to handle odd field errors in ie6/7 - els = $('body').children().filter('.blockUI').add('body > .blockUI'); - else - els = $('.blockUI', el); - - if (full) - pageBlock = pageBlockEls = null; - - if (opts.fadeOut) { - els.fadeOut(opts.fadeOut); - setTimeout(function() { reset(els,data,opts,el); }, opts.fadeOut); - } - else - reset(els, data, opts, el); -}; - -// move blocking element back into the DOM where it started -function reset(els,data,opts,el) { - els.each(function(i,o) { - // remove via DOM calls so we don't lose event handlers - if (this.parentNode) - this.parentNode.removeChild(this); - }); - - if (data && data.el) { - data.el.style.display = data.display; - data.el.style.position = data.position; - if (data.parent) - data.parent.appendChild(data.el); - $(data.el).removeData('blockUI.history'); - } - - if (typeof opts.onUnblock == 'function') - opts.onUnblock(el,opts); -}; - -// bind/unbind the handler -function bind(b, el, opts) { - var full = el == window, $el = $(el); - - // don't bother unbinding if there is nothing to unbind - if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked'))) - return; - if (!full) - $el.data('blockUI.isBlocked', b); - - // don't bind events when overlay is not in use or if bindEvents is false - if (!opts.bindEvents || (b && !opts.showOverlay)) - return; - - // bind anchors and inputs for mouse and key events - var events = 'mousedown mouseup keydown keypress'; - b ? $(document).bind(events, opts, handler) : $(document).unbind(events, handler); - -// former impl... -// var $e = $('a,:input'); -// b ? $e.bind(events, opts, handler) : $e.unbind(events, handler); -}; - -// event handler to suppress keyboard/mouse events when blocking -function handler(e) { - // allow tab navigation (conditionally) - if (e.keyCode && e.keyCode == 9) { - if (pageBlock && e.data.constrainTabKey) { - var els = pageBlockEls; - var fwd = !e.shiftKey && e.target == els[els.length-1]; - var back = e.shiftKey && e.target == els[0]; - if (fwd || back) { - setTimeout(function(){focus(back)},10); - return false; - } - } - } - // allow events within the message content - if ($(e.target).parents('div.blockMsg').length > 0) - return true; - - // allow events for content that is not being blocked - return $(e.target).parents().children().filter('div.blockUI').length == 0; -}; - -function focus(back) { - if (!pageBlockEls) - return; - var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0]; - if (e) - e.focus(); -}; - -function center(el, x, y) { - var p = el.parentNode, s = el.style; - var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth'); - var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth'); - if (x) s.left = l > 0 ? (l+'px') : '0'; - if (y) s.top = t > 0 ? (t+'px') : '0'; -}; - -function sz(el, p) { - return parseInt($.css(el,p))||0; -}; - -})(jQuery); diff --git a/setup/migrate/resources/jquery.form.js b/setup/migrate/resources/jquery.form.js deleted file mode 100644 index 51225ea..0000000 --- a/setup/migrate/resources/jquery.form.js +++ /dev/null @@ -1,13 +0,0 @@ -// $Id: jquery.form.js,v 1.2 2007/11/19 10:05:48 goba Exp $ - -/* - * jQuery Form Plugin - * version: 2.01 (10/31/2007) - * @requires jQuery v1.1 or later - * - * Examples at: http://malsup.com/jquery/form/ - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - */ -eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(5($){$.7.1j=5(o){2(P o==\'5\')o={L:o};o=$.2h({1h:4.X(\'2i\')||1E.2u.3D(),I:4.X(\'2g\')||\'29\'},o||{});3 p={};$.M.N(\'R.2P.2L\',[4,o,p]);2(p.1Q)6 4;3 a=4.1z(o.2r);2(o.V){H(3 n 3u o.V)a.C({z:n,A:o.V[n]})}2(o.28&&o.28(a,4,o)===E)6 4;$.M.N(\'R.K.36\',[a,4,o,p]);2(p.1Q)6 4;3 q=$.1x(a);2(o.I.31()==\'29\'){o.1h+=(o.1h.2Z(\'?\')>=0?\'&\':\'?\')+q;o.V=B}8 o.V=q;3 r=4,U=[];2(o.1r)U.C(5(){r.1r()});2(o.1o)U.C(5(){r.1o()});2(!o.18&&o.14){3 u=o.L||5(){};U.C(5(a){2(4.1N)$(o.14).X("1M",a).1N().D(u,1L);8 $(o.14).2t(a).D(u,1L)})}8 2(o.L)U.C(o.L);o.L=5(a,b){H(3 i=0,F=U.G;i\');3 j=i[0];3 k=$.1i.20&&1E.20.30()<9;2($.1i.1X||k)j.2Y=\'2W:E;1w.2U("");\';i.2S({2R:\'2Q\',23:\'-24\',1R:\'-24\'});3 l={Z:B,1b:B,2K:0,2J:\'n/a\',2H:5(){},2F:5(){},2E:5(){}};3 g=f.2B;2(g&&!$.1O++)$.M.N("2x");2(g)$.M.N("2w",[l,f]);3 m=0;3 n=0;1f(5(){i.2v(\'1n\');j.1K?j.1K(\'1J\',12):j.2s(\'1I\',12,E);3 a=d.1H?\'1H\':\'2q\';3 t=r.X(\'14\');r.X({14:h,2g:\'3C\',2i:f.1h});d[a]=\'3B/R-V\';2(f.1G)1f(5(){n=T;12()},f.1G);d.K();r.X(\'14\',t)},10);5 12(){2(m++)6;j.2o?j.2o(\'1J\',12):j.3A(\'1I\',12,E);3 a=T;3z{2(n)3x\'1G\';3 b,O;O=j.2n?j.2n.1w:j.2l?j.2l:j.1w;l.Z=O.1n?O.1n.1M:B;l.1b=O.2k?O.2k:O;2(f.18==\'2j\'||f.18==\'3s\'){3 c=O.1D(\'1C\')[0];b=c?c.A:l.Z;2(f.18==\'2j\')3r("V = "+b);8 $.3q(b)}8 2(f.18==\'2m\'){b=l.1b;2(!b&&l.Z!=B)b=2d(l.Z)}8{b=l.Z}}3p(e){a=E;$.3n(f,l,\'2b\',e)}2(a){f.L(b,\'L\');2(g)$.M.N("3m",[l,f])}2(g)$.M.N("3k",[l,f]);2(g&&!--$.1O)$.M.N("3j");2(f.27)f.27(l,a?\'L\':\'2b\');1f(5(){i.3i();l.1b=B},3g)};5 2d(s,a){2(1E.26){a=25 26(\'3d.3c\');a.3b=\'E\';a.3a(s)}8 a=(25 38()).37(s,\'1A/2m\');6(a&&a.22&&a.22.1e!=\'34\')?a:B}}};$.7.1j.1a=0;$.7.W=5(a){6 4.21().K(1m).D(5(){4.1u=$.7.W.1a++;$.7.W.1t[4.1u]=a;$(":K,19:Y",4).1Z(1s)})};$.7.W.1a=1;$.7.W.1t={};5 1s(e){3 a=4.R;a.Q=4;2(4.I==\'Y\'){2(e.1Y!=S){a.11=e.1Y;a.16=e.2X}8 2(P $.7.1U==\'5\'){3 b=$(4).1U();a.11=e.1V-b.1R;a.16=e.1W-b.23}8{a.11=e.1V-4.2V;a.16=e.1W-4.32}}1f(5(){a.Q=a.11=a.16=B},10)};5 1m(){3 a=4.1u;3 b=$.7.W.1t[a];$(4).1j(b);6 E};$.7.21=5(){4.1T(\'K\',1m);6 4.D(5(){$(":K,19:Y",4).1T(\'1Z\',1s)})};$.7.1z=5(b){3 a=[];2(4.G==0)6 a;3 c=4[0];3 d=b?c.1D(\'*\'):c.2T;2(!d)6 a;H(3 i=0,F=d.G;i)[^>]*$|^#([\w-]+)$/, - // Is it a simple selector - isSimple = /^.[^:#\[\.,]*$/; - -jQuery.fn = jQuery.prototype = { - init: function( selector, context ) { - // Make sure that a selection was provided - selector = selector || document; - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this[0] = selector; - this.length = 1; - this.context = selector; - return this; - } - // Handle HTML strings - if ( typeof selector === "string" ) { - // Are we dealing with HTML string or an ID? - var match = quickExpr.exec( selector ); - - // Verify a match, and that no context was specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) - selector = jQuery.clean( [ match[1] ], context ); - - // HANDLE: $("#id") - else { - var elem = document.getElementById( match[3] ); - - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem && elem.id != match[3] ) - return jQuery().find( selector ); - - // Otherwise, we inject the element directly into the jQuery object - var ret = jQuery( elem || [] ); - ret.context = document; - ret.selector = selector; - return ret; - } - - // HANDLE: $(expr, [context]) - // (which is just equivalent to: $(content).find(expr) - } else - return jQuery( context ).find( selector ); - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) - return jQuery( document ).ready( selector ); - - // Make sure that old selector state is passed along - if ( selector.selector && selector.context ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return this.setArray(jQuery.isArray( selector ) ? - selector : - jQuery.makeArray(selector)); - }, - - // Start with an empty selector - selector: "", - - // The current version of jQuery being used - jquery: "1.3.2", - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num === undefined ? - - // Return a 'clean' array - Array.prototype.slice.call( this ) : - - // Return just the object - this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems, name, selector ) { - // Build a new jQuery matched element set - var ret = jQuery( elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - ret.context = this.context; - - if ( name === "find" ) - ret.selector = this.selector + (this.selector ? " " : "") + selector; - else if ( name ) - ret.selector = this.selector + "." + name + "(" + selector + ")"; - - // Return the newly-formed element set - return ret; - }, - - // Force the current matched set of elements to become - // the specified array of elements (destroying the stack in the process) - // You should use pushStack() in order to do this, but maintain the stack - setArray: function( elems ) { - // Resetting the length to 0, then using the native Array push - // is a super-fast way to populate an object with array-like properties - this.length = 0; - Array.prototype.push.apply( this, elems ); - - return this; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem && elem.jquery ? elem[0] : elem - , this ); - }, - - attr: function( name, value, type ) { - var options = name; - - // Look for the case where we're accessing a style value - if ( typeof name === "string" ) - if ( value === undefined ) - return this[0] && jQuery[ type || "attr" ]( this[0], name ); - - else { - options = {}; - options[ name ] = value; - } - - // Check to see if we're setting style values - return this.each(function(i){ - // Set all the styles - for ( name in options ) - jQuery.attr( - type ? - this.style : - this, - name, jQuery.prop( this, options[ name ], type, i, name ) - ); - }); - }, - - css: function( key, value ) { - // ignore negative width and height values - if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) - value = undefined; - return this.attr( key, value, "curCSS" ); - }, - - text: function( text ) { - if ( typeof text !== "object" && text != null ) - return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); - - var ret = ""; - - jQuery.each( text || this, function(){ - jQuery.each( this.childNodes, function(){ - if ( this.nodeType != 8 ) - ret += this.nodeType != 1 ? - this.nodeValue : - jQuery.fn.text( [ this ] ); - }); - }); - - return ret; - }, - - wrapAll: function( html ) { - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).clone(); - - if ( this[0].parentNode ) - wrap.insertBefore( this[0] ); - - wrap.map(function(){ - var elem = this; - - while ( elem.firstChild ) - elem = elem.firstChild; - - return elem; - }).append(this); - } - - return this; - }, - - wrapInner: function( html ) { - return this.each(function(){ - jQuery( this ).contents().wrapAll( html ); - }); - }, - - wrap: function( html ) { - return this.each(function(){ - jQuery( this ).wrapAll( html ); - }); - }, - - append: function() { - return this.domManip(arguments, true, function(elem){ - if (this.nodeType == 1) - this.appendChild( elem ); - }); - }, - - prepend: function() { - return this.domManip(arguments, true, function(elem){ - if (this.nodeType == 1) - this.insertBefore( elem, this.firstChild ); - }); - }, - - before: function() { - return this.domManip(arguments, false, function(elem){ - this.parentNode.insertBefore( elem, this ); - }); - }, - - after: function() { - return this.domManip(arguments, false, function(elem){ - this.parentNode.insertBefore( elem, this.nextSibling ); - }); - }, - - end: function() { - return this.prevObject || jQuery( [] ); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: [].push, - sort: [].sort, - splice: [].splice, - - find: function( selector ) { - if ( this.length === 1 ) { - var ret = this.pushStack( [], "find", selector ); - ret.length = 0; - jQuery.find( selector, this[0], ret ); - return ret; - } else { - return this.pushStack( jQuery.unique(jQuery.map(this, function(elem){ - return jQuery.find( selector, elem ); - })), "find", selector ); - } - }, - - clone: function( events ) { - // Do the clone - var ret = this.map(function(){ - if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) { - // IE copies events bound via attachEvent when - // using cloneNode. Calling detachEvent on the - // clone will also remove the events from the orignal - // In order to get around this, we use innerHTML. - // Unfortunately, this means some modifications to - // attributes in IE that are actually only stored - // as properties will not be copied (such as the - // the name attribute on an input). - var html = this.outerHTML; - if ( !html ) { - var div = this.ownerDocument.createElement("div"); - div.appendChild( this.cloneNode(true) ); - html = div.innerHTML; - } - - return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0]; - } else - return this.cloneNode(true); - }); - - // Copy the events from the original to the clone - if ( events === true ) { - var orig = this.find("*").andSelf(), i = 0; - - ret.find("*").andSelf().each(function(){ - if ( this.nodeName !== orig[i].nodeName ) - return; - - var events = jQuery.data( orig[i], "events" ); - - for ( var type in events ) { - for ( var handler in events[ type ] ) { - jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data ); - } - } - - i++; - }); - } - - // Return the cloned set - return ret; - }, - - filter: function( selector ) { - return this.pushStack( - jQuery.isFunction( selector ) && - jQuery.grep(this, function(elem, i){ - return selector.call( elem, i ); - }) || - - jQuery.multiFilter( selector, jQuery.grep(this, function(elem){ - return elem.nodeType === 1; - }) ), "filter", selector ); - }, - - closest: function( selector ) { - var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null, - closer = 0; - - return this.map(function(){ - var cur = this; - while ( cur && cur.ownerDocument ) { - if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) { - jQuery.data(cur, "closest", closer); - return cur; - } - cur = cur.parentNode; - closer++; - } - }); - }, - - not: function( selector ) { - if ( typeof selector === "string" ) - // test special case where just one selector is passed in - if ( isSimple.test( selector ) ) - return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector ); - else - selector = jQuery.multiFilter( selector, this ); - - var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; - return this.filter(function() { - return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; - }); - }, - - add: function( selector ) { - return this.pushStack( jQuery.unique( jQuery.merge( - this.get(), - typeof selector === "string" ? - jQuery( selector ) : - jQuery.makeArray( selector ) - ))); - }, - - is: function( selector ) { - return !!selector && jQuery.multiFilter( selector, this ).length > 0; - }, - - hasClass: function( selector ) { - return !!selector && this.is( "." + selector ); - }, - - val: function( value ) { - if ( value === undefined ) { - var elem = this[0]; - - if ( elem ) { - if( jQuery.nodeName( elem, 'option' ) ) - return (elem.attributes.value || {}).specified ? elem.value : elem.text; - - // We need to handle select boxes special - if ( jQuery.nodeName( elem, "select" ) ) { - var index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type == "select-one"; - - // Nothing was selected - if ( index < 0 ) - return null; - - // Loop through all the selected options - for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { - var option = options[ i ]; - - if ( option.selected ) { - // Get the specifc value for the option - value = jQuery(option).val(); - - // We don't need an array for one selects - if ( one ) - return value; - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - } - - // Everything else, we just grab the value - return (elem.value || "").replace(/\r/g, ""); - - } - - return undefined; - } - - if ( typeof value === "number" ) - value += ''; - - return this.each(function(){ - if ( this.nodeType != 1 ) - return; - - if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) ) - this.checked = (jQuery.inArray(this.value, value) >= 0 || - jQuery.inArray(this.name, value) >= 0); - - else if ( jQuery.nodeName( this, "select" ) ) { - var values = jQuery.makeArray(value); - - jQuery( "option", this ).each(function(){ - this.selected = (jQuery.inArray( this.value, values ) >= 0 || - jQuery.inArray( this.text, values ) >= 0); - }); - - if ( !values.length ) - this.selectedIndex = -1; - - } else - this.value = value; - }); - }, - - html: function( value ) { - return value === undefined ? - (this[0] ? - this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") : - null) : - this.empty().append( value ); - }, - - replaceWith: function( value ) { - return this.after( value ).remove(); - }, - - eq: function( i ) { - return this.slice( i, +i + 1 ); - }, - - slice: function() { - return this.pushStack( Array.prototype.slice.apply( this, arguments ), - "slice", Array.prototype.slice.call(arguments).join(",") ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function(elem, i){ - return callback.call( elem, i, elem ); - })); - }, - - andSelf: function() { - return this.add( this.prevObject ); - }, - - domManip: function( args, table, callback ) { - if ( this[0] ) { - var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(), - scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ), - first = fragment.firstChild; - - if ( first ) - for ( var i = 0, l = this.length; i < l; i++ ) - callback.call( root(this[i], first), this.length > 1 || i > 0 ? - fragment.cloneNode(true) : fragment ); - - if ( scripts ) - jQuery.each( scripts, evalScript ); - } - - return this; - - function root( elem, cur ) { - return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ? - (elem.getElementsByTagName("tbody")[0] || - elem.appendChild(elem.ownerDocument.createElement("tbody"))) : - elem; - } - } -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -function evalScript( i, elem ) { - if ( elem.src ) - jQuery.ajax({ - url: elem.src, - async: false, - dataType: "script" - }); - - else - jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); - - if ( elem.parentNode ) - elem.parentNode.removeChild( elem ); -} - -function now(){ - return +new Date; -} - -jQuery.extend = jQuery.fn.extend = function() { - // copy reference to target object - var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) - target = {}; - - // extend jQuery itself if only one argument is passed - if ( length == i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) - // Extend the base object - for ( var name in options ) { - var src = target[ name ], copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) - continue; - - // Recurse if we're merging object values - if ( deep && copy && typeof copy === "object" && !copy.nodeType ) - target[ name ] = jQuery.extend( deep, - // Never move original objects, clone them - src || ( copy.length != null ? [ ] : { } ) - , copy ); - - // Don't bring in undefined values - else if ( copy !== undefined ) - target[ name ] = copy; - - } - - // Return the modified object - return target; -}; - -// exclude the following css properties to add px -var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, - // cache defaultView - defaultView = document.defaultView || {}, - toString = Object.prototype.toString; - -jQuery.extend({ - noConflict: function( deep ) { - window.$ = _$; - - if ( deep ) - window.jQuery = _jQuery; - - return jQuery; - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return toString.call(obj) === "[object Function]"; - }, - - isArray: function( obj ) { - return toString.call(obj) === "[object Array]"; - }, - - // check if an element is in a (or is an) XML document - isXMLDoc: function( elem ) { - return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" || - !!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument ); - }, - - // Evalulates a script in a global context - globalEval: function( data ) { - if ( data && /\S/.test(data) ) { - // Inspired by code by Andrea Giammarchi - // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html - var head = document.getElementsByTagName("head")[0] || document.documentElement, - script = document.createElement("script"); - - script.type = "text/javascript"; - if ( jQuery.support.scriptEval ) - script.appendChild( document.createTextNode( data ) ); - else - script.text = data; - - // Use insertBefore instead of appendChild to circumvent an IE6 bug. - // This arises when a base node is used (#2709). - head.insertBefore( script, head.firstChild ); - head.removeChild( script ); - } - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); - }, - - // args is for internal usage only - each: function( object, callback, args ) { - var name, i = 0, length = object.length; - - if ( args ) { - if ( length === undefined ) { - for ( name in object ) - if ( callback.apply( object[ name ], args ) === false ) - break; - } else - for ( ; i < length; ) - if ( callback.apply( object[ i++ ], args ) === false ) - break; - - // A special, fast, case for the most common use of each - } else { - if ( length === undefined ) { - for ( name in object ) - if ( callback.call( object[ name ], name, object[ name ] ) === false ) - break; - } else - for ( var value = object[0]; - i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} - } - - return object; - }, - - prop: function( elem, value, type, i, name ) { - // Handle executable functions - if ( jQuery.isFunction( value ) ) - value = value.call( elem, i ); - - // Handle passing in a number to a CSS property - return typeof value === "number" && type == "curCSS" && !exclude.test( name ) ? - value + "px" : - value; - }, - - className: { - // internal only, use addClass("class") - add: function( elem, classNames ) { - jQuery.each((classNames || "").split(/\s+/), function(i, className){ - if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) - elem.className += (elem.className ? " " : "") + className; - }); - }, - - // internal only, use removeClass("class") - remove: function( elem, classNames ) { - if (elem.nodeType == 1) - elem.className = classNames !== undefined ? - jQuery.grep(elem.className.split(/\s+/), function(className){ - return !jQuery.className.has( classNames, className ); - }).join(" ") : - ""; - }, - - // internal only, use hasClass("class") - has: function( elem, className ) { - return elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; - } - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback ) { - var old = {}; - // Remember the old values, and insert the new ones - for ( var name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - callback.call( elem ); - - // Revert the old values - for ( var name in options ) - elem.style[ name ] = old[ name ]; - }, - - css: function( elem, name, force, extra ) { - if ( name == "width" || name == "height" ) { - var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; - - function getWH() { - val = name == "width" ? elem.offsetWidth : elem.offsetHeight; - - if ( extra === "border" ) - return; - - jQuery.each( which, function() { - if ( !extra ) - val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; - if ( extra === "margin" ) - val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0; - else - val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; - }); - } - - if ( elem.offsetWidth !== 0 ) - getWH(); - else - jQuery.swap( elem, props, getWH ); - - return Math.max(0, Math.round(val)); - } - - return jQuery.curCSS( elem, name, force ); - }, - - curCSS: function( elem, name, force ) { - var ret, style = elem.style; - - // We need to handle opacity special in IE - if ( name == "opacity" && !jQuery.support.opacity ) { - ret = jQuery.attr( style, "opacity" ); - - return ret == "" ? - "1" : - ret; - } - - // Make sure we're using the right name for getting the float value - if ( name.match( /float/i ) ) - name = styleFloat; - - if ( !force && style && style[ name ] ) - ret = style[ name ]; - - else if ( defaultView.getComputedStyle ) { - - // Only "float" is needed here - if ( name.match( /float/i ) ) - name = "float"; - - name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); - - var computedStyle = defaultView.getComputedStyle( elem, null ); - - if ( computedStyle ) - ret = computedStyle.getPropertyValue( name ); - - // We should always get a number back from opacity - if ( name == "opacity" && ret == "" ) - ret = "1"; - - } else if ( elem.currentStyle ) { - var camelCase = name.replace(/\-(\w)/g, function(all, letter){ - return letter.toUpperCase(); - }); - - ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { - // Remember the original values - var left = style.left, rsLeft = elem.runtimeStyle.left; - - // Put in the new values to get a computed value out - elem.runtimeStyle.left = elem.currentStyle.left; - style.left = ret || 0; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - elem.runtimeStyle.left = rsLeft; - } - } - - return ret; - }, - - clean: function( elems, context, fragment ) { - context = context || document; - - // !context.createElement fails in IE with an error but returns typeof 'object' - if ( typeof context.createElement === "undefined" ) - context = context.ownerDocument || context[0] && context[0].ownerDocument || document; - - // If a single string is passed in and it's a single tag - // just do a createElement and skip the rest - if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) { - var match = /^<(\w+)\s*\/?>$/.exec(elems[0]); - if ( match ) - return [ context.createElement( match[1] ) ]; - } - - var ret = [], scripts = [], div = context.createElement("div"); - - jQuery.each(elems, function(i, elem){ - if ( typeof elem === "number" ) - elem += ''; - - if ( !elem ) - return; - - // Convert html string into DOM nodes - if ( typeof elem === "string" ) { - // Fix "XHTML"-style tags in all browsers - elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ - return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? - all : - front + ">"; - }); - - // Trim whitespace, otherwise indexOf won't work as expected - var tags = elem.replace(/^\s+/, "").substring(0, 10).toLowerCase(); - - var wrap = - // option or optgroup - !tags.indexOf("", "" ] || - - !tags.indexOf("", "" ] || - - tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && - [ 1, "", "
" ] || - - !tags.indexOf("", "" ] || - - // matched above - (!tags.indexOf("", "" ] || - - !tags.indexOf("", "" ] || - - // IE can't serialize and \ No newline at end of file diff --git a/setup/migrate/templates/welcome.tpl b/setup/migrate/templates/welcome.tpl deleted file mode 100644 index 6b0cd1f..0000000 --- a/setup/migrate/templates/welcome.tpl +++ /dev/null @@ -1,12 +0,0 @@ -
-

Welcome to the KnowledgeTree Upgrade Wizard

- -
-
-
-

This wizard will lead you through the steps needed to migrate your current KnowledgeTree to 3.7.

-
-
- - -
\ No newline at end of file diff --git a/setup/migrate/templates/wizard.tpl b/setup/migrate/templates/wizard.tpl index 3f076c9..72dcbbd 100644 --- a/setup/migrate/templates/wizard.tpl +++ b/setup/migrate/templates/wizard.tpl @@ -1,19 +1,22 @@ - KnowledgeTree Migrater - - - - + KnowledgeTree Installer + js('jquery.js'); ?> + js('jquery.form.js'); ?> + js('jquery.blockUI.js'); ?> + js('jquery.hotkeys.js'); ?> + js('wizard.js'); ?> + css('wizard.css'); ?> + - +
+
 
diff --git a/setup/wizard/config/databases.xml b/setup/wizard/config/databases.xml index c218cc2..b8e19ae 100644 --- a/setup/wizard/config/databases.xml +++ b/setup/wizard/config/databases.xml @@ -14,7 +14,7 @@ localhost 3306 dms - dms + root dmsadmin js9281djw dmsuser diff --git a/setup/wizard/installUtil.php b/setup/wizard/installUtil.php index 55e029d..705d52c 100644 --- a/setup/wizard/installUtil.php +++ b/setup/wizard/installUtil.php @@ -505,6 +505,22 @@ class InstallUtil { } /** + * Get session data from package + * + * @author KnowledgeTree Team + * @params none + * @access private + * @return boolean + */ + public function getDataFromPackage($package, $class) { + if(empty($_SESSION[$package][$class])) { + return false; + } + + return $_SESSION[$package][$class]; + } + + /** * Get session data from post * * @author KnowledgeTree Team diff --git a/setup/wizard/lib/helpers/htmlHelper.php b/setup/wizard/lib/helpers/htmlHelper.php index fe286f0..50150b5 100644 --- a/setup/wizard/lib/helpers/htmlHelper.php +++ b/setup/wizard/lib/helpers/htmlHelper.php @@ -1,7 +1,46 @@ . +* +* You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, +* California 94120-7775, or email info@knowledgetree.com. +* +* The interactive user interfaces in modified source and object code versions +* of this program must display Appropriate Legal Notices, as required under +* Section 5 of the GNU General Public License version 3. +* +* In accordance with Section 7(b) of the GNU General Public License version 3, +* these Appropriate Legal Notices must retain the display of the "Powered by +* KnowledgeTree" logo and retain the original copyright notice. If the display of the +* logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices +* must display the words "Powered by KnowledgeTree" and retain the original +* copyright notice. +* +* @copyright 2008-2009, KnowledgeTree Inc. +* @license GNU General Public License version 3 +* @author KnowledgeTree Team +* @package Installer +* @version Version 0.1 +*/ +class htmlHelper { - class htmlHelper { var $tags = array( 'meta' => '', 'metalink' => '', @@ -61,19 +100,18 @@ } function js($name) { - return ""; + return ""; } function css($name) { - return ""; + return ""; } function image($name, $options = array()) { - $path = "resources/graphics/$name"; + $path = "../wizard/resources/graphics/$name"; $image = sprintf($this->tags['image'], $path, $this->_parseAttributes($options, null, '', ' ')); return $image; - //return ""; } function _parseAttributes($options, $exclude = null, $insertBefore = ' ', $insertAfter = null) { @@ -105,7 +143,7 @@ if (is_array($value)) { $value = ''; } - + if (in_array($key, $minimizedAttributes)) { if ($value === 1 || $value === true || $value === 'true' || $value == $key) { $attribute = sprintf($attributeFormat, $key, $key); @@ -128,6 +166,6 @@ return array_map('h', $text); } return htmlspecialchars($text, ENT_QUOTES, $charset); - } - } +} +} ?> \ No newline at end of file diff --git a/setup/wizard/step.php b/setup/wizard/step.php index 66e0b84..5c12b70 100644 --- a/setup/wizard/step.php +++ b/setup/wizard/step.php @@ -116,8 +116,7 @@ class Step * @access public * @return string */ - public function doStep() - { + public function doStep() { return ''; } @@ -133,8 +132,7 @@ class Step * @access public * @return array */ - public function getStepVars() - { + public function getStepVars() { return $this->temp_variables; } @@ -291,6 +289,7 @@ class Step * @return boolean */ public function inStep($name) { + if(!isset($_GET['step_name'])) return false; if($_GET['step_name'] == $name) return true; return false; @@ -314,7 +313,23 @@ class Step } /** - * Get session data from post + * Get session data from package + * + * @author KnowledgeTree Team + * @params none + * @access private + * @return boolean + */ + public function getDataFromPackage($package, $class) { + if(empty($_SESSION[$package][$class])) { + return false; + } + + return $_SESSION[$package][$class]; + } + + /** + * Get session data from class * * @author KnowledgeTree Team * @params none diff --git a/setup/wizard/stepAction.php b/setup/wizard/stepAction.php index 94e264f..e0d125d 100644 --- a/setup/wizard/stepAction.php +++ b/setup/wizard/stepAction.php @@ -304,38 +304,37 @@ class stepAction { */ public function getLeftMenu() { - $menu = ''; + $sideMenuElements = array(); $active = false; if($this->stepClassNames) { + $ele = array(); foreach ($this->stepClassNames as $k=>$step) { + $ele['step'] = $step; if($this->step_names[$step] != '') { - $item = $this->step_names[$step]; + $ele['name'] = $this->step_names[$step]; } else { - $item = $this->makeHeading($step); + $ele['name'] = $this->makeHeading($step); } if($step == $this->stepName) { - $class = 'current'; - $active = true; + $ele['class'] = 'current'; + $active = true; } else { - if($active){ - $class = 'inactive'; - }else{ - $class = 'indicator'; - if (AJAX) { - $options = "\"index.php?step_name={$step}\", \"content_container\""; - $item = "{$item}"; - } else { - $item = "{$item}"; - } + if($active) { + $ele['class'] = 'inactive'; + } else { + $ele['class'] = 'indicator'; } } - $menu .= "$item
"; + $sideMenuElements[] = $ele; } } + $step_tpl = new Template("templates/sidemenu.tpl"); // Create template + $step_tpl->set("sideMenuElements", $sideMenuElements); // Set side menu elements + $step_tpl->set("ajax", AJAX); // Set ajax state - return $menu; + return $step_tpl->fetch(); } - + /** * Returns confirmation page flag * diff --git a/setup/wizard/steps/configuration.php b/setup/wizard/steps/configuration.php index f4d1ac0..eb079a1 100644 --- a/setup/wizard/steps/configuration.php +++ b/setup/wizard/steps/configuration.php @@ -308,9 +308,6 @@ class configuration extends Step private function registerDirs() { // Adjust directories variables $this->readConfigPath(); $dirs = $this->getFromConfigPath(); - $dbconf = $this->getDataFromSession("database"); // retrieve database information from session - $this->_dbhandler->load($dbconf['dhost'], $dbconf['duname'], $dbconf['dpassword'], $dbconf['dname']); // initialise the db connection - //$this->_dbhandler->getDatabaseLink() $directories['varDirectory'] = array('section'=>'urls', 'value'=>addslashes($dirs['varDirectory']['path']), 'setting'=>'varDirectory'); $directories['logDirectory'] = array('section'=>'urls', 'value'=>addslashes($dirs['logDirectory']['path']), 'setting'=>'logDirectory'); $directories['documentRoot'] = array('section'=>'urls', 'value'=>addslashes($dirs['documentRoot']['path']), 'setting'=>'documentRoot'); @@ -331,7 +328,12 @@ class configuration extends Step $conf = $this->getDataFromSession("configuration"); // get data from the server $server = $conf['server']; $paths = $conf['paths']; - $this->readConfigPath(); // initialise writing to config.ini + // TODO + if (file_exists('migrate.lock')) { // Check if its an upgrade + $this->readInstallation(); + } else { + $this->readConfigPath(); // initialise writing to config.ini + } $dirs = $this->getFromConfigPath(); if(isset($this->confpaths['configIni'])) { // Check if theres a config path $configPath = realpath("../../{$this->confpaths['configIni']}"); // Relative to Config Path File @@ -467,9 +469,12 @@ class configuration extends Step if(isset($this->temp_variables['paths'])) { $dirs = $this->temp_variables['paths']; // Pull from temp } else { - $this->readConfigPath(); - $dirs = $this->getFromConfigPath(); - + if (file_exists('migrate.lock')) { // Check if its an upgrade + $this->readInstallation(); // Read values from config.ini of other installation + } else { + $this->readConfigPath(); // Read contents of config-path file + } + $dirs = $this->getFromConfigPath(); // Store contents } $varDirectory = $fileSystemRoot . DS . 'var'; foreach ($dirs as $key => $dir){ @@ -611,12 +616,42 @@ class configuration extends Step } /** + * Migration Path finder + * + * @author KnowledgeTree Team + * @access private + * @param none + * @return boolean + */ + private function readInstallation() { + $inst = $this->getDataFromPackage('migrate', 'installation'); + foreach ($inst['urlPaths'] as $name=>$path) { + $k = $path['path']; + if($path['name'] == 'Var Directory') { + $this->confpaths['var'] = $k; + } elseif($path['name'] == 'Log Directory') { + $this->confpaths['log'] = $k; + } elseif($path['name'] == 'Document Root') { + $this->confpaths['Documents'] = $k; + } elseif($path['name'] == 'UI Directory') { + + } elseif($path['name'] == 'Temporary Directory') { + $this->confpaths['tmp'] = $k; + } elseif($path['name'] == 'Cache Directory') { + $this->confpaths['cache'] = $k; + } + } + + return true; + } + + /** * Read contents of config path file * * @author KnowledgeTree Team * @access private * @param none - * @return array The path information + * @return boolean */ private function readConfigPath() { $configPath = $this->getContentPath(); diff --git a/setup/wizard/steps/install.php b/setup/wizard/steps/install.php index 7313cdb..667da0e 100644 --- a/setup/wizard/steps/install.php +++ b/setup/wizard/steps/install.php @@ -107,22 +107,29 @@ class install extends step public function installStep() { - $conf = $this->getDataFromSession("install"); - // retrieve database information from session - // initialise the db connection + $this->callHome(); + $this->clearSeesions(); + } + + public function clearSeesions() { + // TODO + $_SESSION['installers'] = ''; + $_SESSION['migrate'] = ''; + } + + public function callHome() { + $conf = $this->getDataFromSession("install"); // retrieve database information from session $this->_dbhandler = new dbUtil(); $dbconf = $this->getDataFromSession("database"); - $this->_dbhandler->load($dbconf['dhost'], $dbconf['duname'], $dbconf['dpassword'], $dbconf['dname']); - + $this->_dbhandler->load($dbconf['dhost'], $dbconf['duname'], $dbconf['dpassword'], $dbconf['dname']); // initialise the db connection $complete = 1; if($conf['call_home'] == 'enable'){ $complete = 0; } $query = "UPDATE scheduler_tasks SET is_complete = {$complete} WHERE task = 'Call Home'"; $this->_dbhandler->query($query); - // close the database connection - $this->_dbhandler->close(); + $this->_dbhandler->close(); } } ?> \ No newline at end of file diff --git a/setup/wizard/steps/services.php b/setup/wizard/steps/services.php index 0c22ea6..b3b63a8 100644 --- a/setup/wizard/steps/services.php +++ b/setup/wizard/steps/services.php @@ -986,11 +986,14 @@ class services extends Step * @return mixed */ public function installStep() { - foreach ($this->getServices() as $serviceName) { - $className = OS.$serviceName; - $service = new $className(); - $status = $this->serviceStart($service); + if (!file_exists('migrate.lock')) { // Check if it is a migration + foreach ($this->getServices() as $serviceName) { + $className = OS.$serviceName; + $service = new $className(); + $status = $this->serviceStart($service); + } } + return true; } diff --git a/setup/wizard/template.php b/setup/wizard/template.php index e33ff34..28d5c35 100644 --- a/setup/wizard/template.php +++ b/setup/wizard/template.php @@ -101,7 +101,6 @@ class Template } $this->template_vars['html'] = new htmlHelper(); extract($this->template_vars); // Extract the vars to local namespace - ob_start(); include($file); $contents = ob_get_contents(); diff --git a/setup/wizard/templates/installtype.tpl b/setup/wizard/templates/installtype.tpl index 3901de1..5c48b5f 100644 --- a/setup/wizard/templates/installtype.tpl +++ b/setup/wizard/templates/installtype.tpl @@ -7,7 +7,7 @@

The wizard will require you choose between an upgrade of an existing sytem or a clean install.

-
image('dame/kt_browse.png'); ?>
+
image('kt_browse.png'); ?>
diff --git a/setup/wizard/templates/sidemenu.tpl b/setup/wizard/templates/sidemenu.tpl new file mode 100644 index 0000000..c657cfc --- /dev/null +++ b/setup/wizard/templates/sidemenu.tpl @@ -0,0 +1,26 @@ + + + + + + + ", "content_container");}'> + + + + + + + + + + + + + +
+ \ No newline at end of file