summaryrefslogtreecommitdiffstats
path: root/app/controllers
Commit message (Expand)AuthorAgeFilesLines
* prevent "can't modify frozen String" exception when mail sending error (#17235)Toshi MARUYAMA2014-07-011-1/+1
* fix variable name confusion at AttachmentsController#thumbnailToshi MARUYAMA2014-06-081-3/+3
* Count users with a single query on group list (#16905).Jean-Philippe Lang2014-05-241-2/+11
* Field set as read-only still available in the issues list context menu (#16755).Jean-Philippe Lang2014-05-021-1/+1
* fix non-ascii attachment file name get corrupted in IE11 (#16711)Toshi MARUYAMA2014-04-171-1/+1
* fix typo at app/controllers/repositories_controller.rbToshi MARUYAMA2014-04-161-1/+1
* Potentiel data leak in "Invalid form authenticity token" error screen (#16511).Jean-Philippe Lang2014-04-051-0/+1
* Fixed that back_url=/ param is ignored (#16467).Jean-Philippe Lang2014-04-051-1/+1
* Fixed back url verification (#16466).Jean-Philippe Lang2014-03-291-1/+1
* remove unneeded Relation#all from WorkflowsController#editToshi MARUYAMA2014-03-241-1/+1
* Fixed: Error generated on 'search for watchers to add' after clicking add wit...Jean-Philippe Lang2014-03-211-0/+3
* Fixed flawed regexp for removing pre blocks when quoting messages (#16353).Jean-Philippe Lang2014-03-171-1/+1
* Fixed flawed regexp for removing pre blocks when quoting notes (#16353).Jean-Philippe Lang2014-03-151-1/+1
* Bulk edit workflows for multiple trackers/roles (#16164).Jean-Philippe Lang2014-02-251-46/+57
* Trigger basic HTTP authentication only when Basic authorization header is pre...Jean-Philippe Lang2014-02-221-1/+1
* Preload authors for /issues API calls.Jean-Philippe Lang2014-02-221-0/+1
* Preload issue relations when exporting issues to CSV with all columns (#16091).Jean-Philippe Lang2014-02-221-0/+3
* Enable the watching of news (#2549).Jean-Philippe Lang2014-02-091-1/+7
* Reverts r12855.Jean-Philippe Lang2014-02-071-4/+0
* Adds JS response support to #render_error (#15760).Jean-Philippe Lang2014-02-071-0/+4
* Code cleanup.Jean-Philippe Lang2014-02-071-1/+0
* Show tabs for existing custom field types only and adds a view for choosing t...Jean-Philippe Lang2014-02-071-1/+1
* update copyright year (#15977)Toshi MARUYAMA2014-01-2946-46/+46
* remove unneeded Relation#all from WorkflowsControllerToshi MARUYAMA2014-01-271-2/+2
* Successful update notice for workflows (#15831).Jean-Philippe Lang2014-01-251-0/+2
* Redirect to back_url or referer when clicking "Sign in" while already logged-...Jean-Philippe Lang2014-01-252-2/+5
* Adds settings for disabling browser language detection and language preferenc...Jean-Philippe Lang2014-01-241-1/+1
* Don't display default watchers checkboxes on the new issue form when there ar...Jean-Philippe Lang2014-01-192-6/+20
* Code cleanup (#14766).Jean-Philippe Lang2014-01-111-1/+1
* cleanup syntax of Relation#all at WikiController#exportToshi MARUYAMA2014-01-111-1/+4
* code format cleanup WikiControllerToshi MARUYAMA2014-01-111-2/+8
* Rails4: replace deprecated find_all_by_* at WatchersControllerToshi MARUYAMA2014-01-101-2/+2
* Rails4: replace deprecated find_all_by_* at RepositoriesController#committersToshi MARUYAMA2014-01-101-1/+1
* Rails4: replace deprecated find_all_by_* at TimelogController#find_time_entriesToshi MARUYAMA2014-01-101-1/+1
* cleanup syntax of Relation#all at QueriesController#indexToshi MARUYAMA2014-01-101-3/+5
* cleanup syntax of Relation#all at MembersController#indexToshi MARUYAMA2014-01-101-6/+5
* cleanup syntax of Relation#all at IssueStatusesController#indexToshi MARUYAMA2014-01-101-1/+1
* cleanup syntax of Relation#all at NewsController#indexToshi MARUYAMA2014-01-101-5/+5
* Rails4: replace deprecated Relation#count with finder options at ProjectsCont...Toshi MARUYAMA2014-01-101-2/+2
* add missing Relation#all at WorkflowsController#copy of r12583Toshi MARUYAMA2014-01-101-1/+1
* Rails4: replace deprecated find_all_by_* at WorkflowsController#copyToshi MARUYAMA2014-01-101-5/+4
* Rails4: replace deprecated Relation#update_all at IssuesControllerToshi MARUYAMA2014-01-101-2/+3
* Rails4: replace deprecated find_all_by_* at IssuesControllerToshi MARUYAMA2014-01-101-1/+1
* Rails4: replace deprecated passing options to find at MessagesControllerToshi MARUYAMA2014-01-081-2/+2
* Rails4: replace deprecated find_all_by_* at GroupsControllerToshi MARUYAMA2014-01-081-1/+1
* Fixed that OpenID authentication fails with 422 error due to token verificati...Jean-Philippe Lang2013-12-211-0/+8
* Fixed that filtering time entries on activity does not take care of activity ...Jean-Philippe Lang2013-12-151-1/+1
* Removed hardcoded formats for right-click edit.Jean-Philippe Lang2013-12-141-4/+2
* Merged custom fields format refactoring.Jean-Philippe Lang2013-12-141-2/+2
* Fixed that preferences are not preserved when adding a user fails (#15552).Jean-Philippe Lang2013-11-291-3/+1
s="s2">"@VERSION", widgetEventPrefix: "drop", options: { accept: "*", activeClass: false, addClasses: true, greedy: false, hoverClass: false, scope: "default", tolerance: "intersect", // callbacks activate: null, deactivate: null, drop: null, out: null, over: null }, _create: function() { var o = this.options, accept = o.accept; this.isover = false; this.isout = true; this.accept = $.isFunction(accept) ? accept : function(d) { return d.is(accept); }; //Store the droppable's proportions this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight }; // Add the reference and positions to the manager $.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || []; $.ui.ddmanager.droppables[o.scope].push(this); (o.addClasses && this.element.addClass("ui-droppable")); }, _destroy: function() { var i = 0, drop = $.ui.ddmanager.droppables[this.options.scope]; for ( ; i < drop.length; i++ ) { if ( drop[i] === this ) { drop.splice(i, 1); } } this.element.removeClass("ui-droppable ui-droppable-disabled"); }, _setOption: function(key, value) { if(key === "accept") { this.accept = $.isFunction(value) ? value : function(d) { return d.is(value); }; } this._super( key, value ); }, _activate: function(event) { var draggable = $.ui.ddmanager.current; if(this.options.activeClass) { this.element.addClass(this.options.activeClass); } if(draggable){ this._trigger("activate", event, this.ui(draggable)); } }, _deactivate: function(event) { var draggable = $.ui.ddmanager.current; if(this.options.activeClass) { this.element.removeClass(this.options.activeClass); } if(draggable){ this._trigger("deactivate", event, this.ui(draggable)); } }, _over: function(event) { var draggable = $.ui.ddmanager.current; // Bail if draggable and droppable are same element if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) { return; } if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { if(this.options.hoverClass) { this.element.addClass(this.options.hoverClass); } this._trigger("over", event, this.ui(draggable)); } }, _out: function(event) { var draggable = $.ui.ddmanager.current; // Bail if draggable and droppable are same element if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) { return; } if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { if(this.options.hoverClass) { this.element.removeClass(this.options.hoverClass); } this._trigger("out", event, this.ui(draggable)); } }, _drop: function(event,custom) { var draggable = custom || $.ui.ddmanager.current, childrenIntersection = false; // Bail if draggable and droppable are same element if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) { return false; } this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function() { var inst = $( this ).droppable( "instance" ); if( inst.options.greedy && !inst.options.disabled && inst.options.scope === draggable.options.scope && inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) && $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance) ) { childrenIntersection = true; return false; } }); if(childrenIntersection) { return false; } if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { if(this.options.activeClass) { this.element.removeClass(this.options.activeClass); } if(this.options.hoverClass) { this.element.removeClass(this.options.hoverClass); } this._trigger("drop", event, this.ui(draggable)); return this.element; } return false; }, ui: function(c) { return { draggable: (c.currentItem || c.element), helper: c.helper, position: c.position, offset: c.positionAbs }; } }); $.ui.intersect = function(draggable, droppable, toleranceMode) { if (!droppable.offset) { return false; } var draggableLeft, draggableTop, x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width, y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height, l = droppable.offset.left, r = l + droppable.proportions.width, t = droppable.offset.top, b = t + droppable.proportions.height; switch (toleranceMode) { case "fit": return (l <= x1 && x2 <= r && t <= y1 && y2 <= b); case "intersect": return (l < x1 + (draggable.helperProportions.width / 2) && // Right Half x2 - (draggable.helperProportions.width / 2) < r && // Left Half t < y1 + (draggable.helperProportions.height / 2) && // Bottom Half y2 - (draggable.helperProportions.height / 2) < b ); // Top Half case "pointer": draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left); draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top); return isOverAxis( draggableTop, t, droppable.proportions.height ) && isOverAxis( draggableLeft, l, droppable.proportions.width ); case "touch": return ( (y1 >= t && y1 <= b) || // Top edge touching (y2 >= t && y2 <= b) || // Bottom edge touching (y1 < t && y2 > b) // Surrounded vertically ) && ( (x1 >= l && x1 <= r) || // Left edge touching (x2 >= l && x2 <= r) || // Right edge touching (x1 < l && x2 > r) // Surrounded horizontally ); default: return false; } }; /* This manager tracks offsets of draggables and droppables */ $.ui.ddmanager = { current: null, droppables: { "default": [] }, prepareOffsets: function(t, event) { var i, j, m = $.ui.ddmanager.droppables[t.options.scope] || [], type = event ? event.type : null, // workaround for #2317 list = (t.currentItem || t.element).find(":data(ui-droppable)").addBack(); droppablesLoop: for (i = 0; i < m.length; i++) { //No disabled and non-accepted if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) { continue; } // Filter out elements in the current dragged item for (j=0; j < list.length; j++) { if(list[j] === m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } } m[i].visible = m[i].element.css("display") !== "none"; if(!m[i].visible) { continue; } //Activate the droppable if used directly from draggables if(type === "mousedown") { m[i]._activate.call(m[i], event); } m[i].offset = m[i].element.offset(); m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight }; } }, drop: function(draggable, event) { var dropped = false; // Create a copy of the droppables in case the list changes during the drop (#9116) $.each(($.ui.ddmanager.droppables[draggable.options.scope] || []).slice(), function() { if(!this.options) { return; } if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) { dropped = this._drop.call(this, event) || dropped; } if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { this.isout = true; this.isover = false; this._deactivate.call(this, event); } }); return dropped; }, dragStart: function( draggable, event ) { //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003) draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() { if( !draggable.options.refreshPositions ) { $.ui.ddmanager.prepareOffsets( draggable, event ); } }); }, drag: function(draggable, event) { //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse. if(draggable.options.refreshPositions) { $.ui.ddmanager.prepareOffsets(draggable, event); } //Run through all droppables and check their positions based on specific tolerance options $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() { if(this.options.disabled || this.greedyChild || !this.visible) { return; } var parentInstance, scope, parent, intersects = $.ui.intersect(draggable, this, this.options.tolerance), c = !intersects && this.isover ? "isout" : (intersects && !this.isover ? "isover" : null); if(!c) { return; } if (this.options.greedy) { // find droppable parents with same scope scope = this.options.scope; parent = this.element.parents(":data(ui-droppable)").filter(function () { return $(this).droppable( "instance" ).options.scope === scope; }); if (parent.length) { parentInstance = $( parent[ 0 ] ).droppable( "instance" ); parentInstance.greedyChild = (c === "isover"); } } // we just moved into a greedy child if (parentInstance && c === "isover") { parentInstance.isover = false; parentInstance.isout = true; parentInstance._out.call(parentInstance, event); } this[c] = true; this[c === "isout" ? "isover" : "isout"] = false; this[c === "isover" ? "_over" : "_out"].call(this, event); // we just moved out of a greedy child if (parentInstance && c === "isout") { parentInstance.isout = false; parentInstance.isover = true; parentInstance._over.call(parentInstance, event); } }); }, dragStop: function( draggable, event ) { draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" ); //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003) if( !draggable.options.refreshPositions ) { $.ui.ddmanager.prepareOffsets( draggable, event ); } } }; })(jQuery);