diff --git a/Assistant/WebApp/RepoList.hs b/Assistant/WebApp/RepoList.hs index 3d7fc3e472..de9e66979f 100644 --- a/Assistant/WebApp/RepoList.hs +++ b/Assistant/WebApp/RepoList.hs @@ -112,6 +112,10 @@ getRepoListR (RepoListNotificationId nid reposelector) = do repoListDisplay :: RepoSelector -> Widget repoListDisplay reposelector = do autoUpdate ident (NotifierRepoListR reposelector) (10 :: Int) (10 :: Int) + addScript $ StaticR jquery_ui_core_js + addScript $ StaticR jquery_ui_widget_js + addScript $ StaticR jquery_ui_mouse_js + addScript $ StaticR jquery_ui_sortable_js repolist <- lift $ repoList reposelector @@ -209,7 +213,7 @@ getMoveRepositoryDown u = do reorderRepository :: UUID -> Handler () reorderRepository uuid = do - liftAnnex $ do + void $ liftAnnex $ do remote <- fromMaybe (error "Unknown UUID") <$> Remote.remoteFromUUID uuid rs <- Remote.enabledRemoteList diff --git a/debian/copyright b/debian/copyright index 90ae279c0b..d43053508e 100644 --- a/debian/copyright +++ b/debian/copyright @@ -91,6 +91,11 @@ License: MIT or GPL-2 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Files: underlays/attachments/ikiwiki/jquery-ui* +Copyright: © 2008 Paul Bakaus + © 2011 the jQuery UI Authors (http://jqueryui.com/about) +License: GPL-2 + Files: static/jquery-ui* Copyright: © 2008 Paul Bakaus © 2011 the jQuery UI Authors (http://jqueryui.com/about) diff --git a/static/jquery.ui.core.js b/static/jquery.ui.core.js new file mode 100644 index 0000000000..62075435ef --- /dev/null +++ b/static/jquery.ui.core.js @@ -0,0 +1,324 @@ +/*! + * jQuery UI Core 1.10.1 + * http://jqueryui.com + * + * Copyright 2013 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/category/ui-core/ + */ +(function( $, undefined ) { + +var uuid = 0, + runiqueId = /^ui-id-\d+$/; + +// prevent duplicate loading +// this is only a problem because we proxy existing functions +// and we don't want to double proxy them +$.ui = $.ui || {}; +if ( $.ui.version ) { + return; +} + +$.extend( $.ui, { + version: "1.10.1", + + keyCode: { + BACKSPACE: 8, + COMMA: 188, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + LEFT: 37, + NUMPAD_ADD: 107, + NUMPAD_DECIMAL: 110, + NUMPAD_DIVIDE: 111, + NUMPAD_ENTER: 108, + NUMPAD_MULTIPLY: 106, + NUMPAD_SUBTRACT: 109, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SPACE: 32, + TAB: 9, + UP: 38 + } +}); + +// plugins +$.fn.extend({ + _focus: $.fn.focus, + focus: function( delay, fn ) { + return typeof delay === "number" ? + this.each(function() { + var elem = this; + setTimeout(function() { + $( elem ).focus(); + if ( fn ) { + fn.call( elem ); + } + }, delay ); + }) : + this._focus.apply( this, arguments ); + }, + + scrollParent: function() { + var scrollParent; + if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) { + scrollParent = this.parents().filter(function() { + return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); + }).eq(0); + } else { + scrollParent = this.parents().filter(function() { + return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); + }).eq(0); + } + + return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent; + }, + + zIndex: function( zIndex ) { + if ( zIndex !== undefined ) { + return this.css( "zIndex", zIndex ); + } + + if ( this.length ) { + var elem = $( this[ 0 ] ), position, value; + while ( elem.length && elem[ 0 ] !== document ) { + // Ignore z-index if position is set to a value where z-index is ignored by the browser + // This makes behavior of this function consistent across browsers + // WebKit always returns auto if the element is positioned + position = elem.css( "position" ); + if ( position === "absolute" || position === "relative" || position === "fixed" ) { + // IE returns 0 when zIndex is not specified + // other browsers return a string + // we ignore the case of nested elements with an explicit value of 0 + //
- #{num} - | + | |||
+ #{name} - | + | $if needsEnabled actions not enabled @@ -27,14 +26,10 @@ syncing paused $else syncing enabled - | + | $if needsEnabled actions enable $else configure - - ↑ - - ↓ diff --git a/templates/configurators/repositories/list.julius b/templates/configurators/repositories/list.julius new file mode 100644 index 0000000000..c75c9c841c --- /dev/null +++ b/templates/configurators/repositories/list.julius @@ -0,0 +1,16 @@ +$(function() { + $("#costsortable").sortable({ + handle: ".handle", + cursor: "move", + forceHelperSize: true, + start: function(event, ui) { + ui.item.children(".draghide").hide(); + }, + stop: function(event, ui) { + ui.item.children(".draghide").show(); + $.ajax({ + 'url': "http://localhost/testajax", + }); + }, + }); +}); |