##// END OF EJS Templates
Changed the notifications to use a hierarchy UI...
Changed the notifications to use a hierarchy UI git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4222 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r4108:26ef9da02b7e
r4108:26ef9da02b7e
Show More
application.js
241 lines | 6.4 KiB | application/javascript | JavascriptLexer
Jean-Philippe Lang
Issue list now supports bulk edit/move/delete (#563, #607). For now, issues from different projects can not be bulk edited/moved/deleted at once....
r1116 /* redMine - project management software
Copyright (C) 2006-2008 Jean-Philippe Lang */
Jean-Philippe Lang
Added svn:eol-style native property for various files...
r416 function checkAll (id, checked) {
Jean-Philippe Lang
Fixed: Check All / Uncheck All in Email Settings doesn't work (#1180)....
r1414 var els = Element.descendants(id);
for (var i = 0; i < els.length; i++) {
if (els[i].disabled==false) {
els[i].checked = checked;
Jean-Philippe Lang
Added svn:eol-style native property for various files...
r416 }
}
}
Jean-Philippe Lang
Adds checkboxes toggle links on permissions report....
r1769 function toggleCheckboxesBySelector(selector) {
boxes = $$(selector);
var all_checked = true;
for (i = 0; i < boxes.length; i++) { if (boxes[i].checked == false) { all_checked = false; } }
for (i = 0; i < boxes.length; i++) { boxes[i].checked = !all_checked; }
}
Eric Davis
Changed the notifications to use a hierarchy UI...
r4108 function setCheckboxesBySelector(checked, selector) {
var boxes = $$(selector);
boxes.each(function(ele) {
ele.checked = checked;
});
}
Jean-Philippe Lang
Makes issue update link work without javascript (#1337)....
r1591 function showAndScrollTo(id, focus) {
Element.show(id);
if (focus!=null) { Form.Element.focus(focus); }
Element.scrollTo(id);
}
Jean-Philippe Lang
Adds group folding on issue list (#2679)....
r2615 function toggleRowGroup(el) {
var tr = Element.up(el, 'tr');
var n = Element.next(tr);
tr.toggleClassName('open');
while (n != undefined && !n.hasClassName('group')) {
Element.toggle(n);
n = Element.next(n);
}
}
Jean-Philippe Lang
Makes tickets and timelogs filters collapsible (UI)....
r2777 function toggleFieldset(el) {
var fieldset = Element.up(el, 'fieldset');
fieldset.toggleClassName('collapsed');
Effect.toggle(fieldset.down('div'), 'slide', {duration:0.2});
}
Jean-Philippe Lang
Adds an optional description to attachments....
r1166 var fileFieldCount = 1;
Jean-Philippe Lang
Added svn:eol-style native property for various files...
r416 function addFileField() {
Jean-Philippe Lang
Adds an optional description to attachments....
r1166 if (fileFieldCount >= 10) return false
fileFieldCount++;
Jean-Philippe Lang
Added svn:eol-style native property for various files...
r416 var f = document.createElement("input");
f.type = "file";
Jean-Philippe Lang
Adds an optional description to attachments....
r1166 f.name = "attachments[" + fileFieldCount + "][file]";
Jean-Philippe Lang
Added svn:eol-style native property for various files...
r416 f.size = 30;
Jean-Philippe Lang
Adds an optional description to attachments....
r1166 var d = document.createElement("input");
d.type = "text";
d.name = "attachments[" + fileFieldCount + "][description]";
d.size = 60;
Jean-Philippe Lang
Fixed: Add Another file to ticket doesn't work in IE (broken by r3750)....
r3765 var dLabel = new Element('label');
Eric Davis
Convert the file attachment's description to a label....
r3636 dLabel.addClassName('inline');
// Pulls the languge value used for Optional Description
dLabel.update($('attachment_description_label_content').innerHTML)
Jean-Philippe Lang
Adds an optional description to attachments....
r1166 p = document.getElementById("attachments_fields");
Jean-Philippe Lang
Added svn:eol-style native property for various files...
r416 p.appendChild(document.createElement("br"));
p.appendChild(f);
Eric Davis
Convert the file attachment's description to a label....
r3636 p.appendChild(dLabel);
dLabel.appendChild(d);
Jean-Philippe Lang
Added svn:eol-style native property for various files...
r416 }
function showTab(name) {
var f = $$('div#content .tab-content');
for(var i=0; i<f.length; i++){
Element.hide(f[i]);
}
var f = $$('div.tabs a');
for(var i=0; i<f.length; i++){
Element.removeClassName(f[i], "selected");
}
Element.show('tab-content-' + name);
Element.addClassName('tab-' + name, "selected");
return false;
Jean-Philippe Lang
Added an ajax indicator for all ajax calls. Also removed highlight effects on my page layout edition....
r482 }
Jean-Philippe Lang
Adds buttons to scroll the tabs when they overflow....
r3060 function moveTabRight(el) {
var lis = Element.up(el, 'div.tabs').down('ul').childElements();
var tabsWidth = 0;
var i;
for (i=0; i<lis.length; i++) {
if (lis[i].visible()) {
tabsWidth += lis[i].getWidth() + 6;
}
}
if (tabsWidth < Element.up(el, 'div.tabs').getWidth() - 60) {
return;
}
i=0;
while (i<lis.length && !lis[i].visible()) {
i++;
}
lis[i].hide();
}
function moveTabLeft(el) {
var lis = Element.up(el, 'div.tabs').down('ul').childElements();
var i = 0;
while (i<lis.length && !lis[i].visible()) {
i++;
}
if (i>0) {
lis[i-1].show();
}
}
function displayTabsButtons() {
var lis;
var tabsWidth = 0;
var i;
$$('div.tabs').each(function(el) {
lis = el.down('ul').childElements();
for (i=0; i<lis.length; i++) {
if (lis[i].visible()) {
tabsWidth += lis[i].getWidth() + 6;
}
}
Jean-Philippe Lang
Do not hide scroll buttons if some tabs are still hidden....
r3064 if ((tabsWidth < el.getWidth() - 60) && (lis[0].visible())) {
Jean-Philippe Lang
Adds buttons to scroll the tabs when they overflow....
r3060 el.down('div.tabs-buttons').hide();
} else {
el.down('div.tabs-buttons').show();
}
});
}
Jean-Philippe Lang
Issue relations first commit (not thoroughly tested). 4 kinds of relation are available:...
r503 function setPredecessorFieldsVisibility() {
relationType = $('relation_relation_type');
Jean-Philippe Lang
Adds 'follows' relation (#1432)....
r3076 if (relationType && (relationType.value == "precedes" || relationType.value == "follows")) {
Jean-Philippe Lang
Issue relations first commit (not thoroughly tested). 4 kinds of relation are available:...
r503 Element.show('predecessor_fields');
} else {
Element.hide('predecessor_fields');
}
}
Jean-Philippe Lang
Added a link to add a new category when creating or editing an issue....
r642 function promptToRemote(text, param, url) {
value = prompt(text + ':');
if (value) {
Jean-Philippe Lang
Fixed: encoding problem when adding non-ASCII issue category in the new issue page (#1286)....
r1428 new Ajax.Request(url + '?' + param + '=' + encodeURIComponent(value), {asynchronous:true, evalScripts:true});
Jean-Philippe Lang
Added a link to add a new category when creating or editing an issue....
r642 return false;
}
}
Jean-Philippe Lang
SCM browser: directories can now be collapsed and re-expanded with no additional request....
r850 function collapseScmEntry(id) {
var els = document.getElementsByClassName(id, 'browser');
for (var i = 0; i < els.length; i++) {
Jean-Philippe Lang
SCM browser:...
r854 if (els[i].hasClassName('open')) {
collapseScmEntry(els[i].id);
}
Jean-Philippe Lang
SCM browser: directories can now be collapsed and re-expanded with no additional request....
r850 Element.hide(els[i]);
}
$(id).removeClassName('open');
}
function expandScmEntry(id) {
var els = document.getElementsByClassName(id, 'browser');
for (var i = 0; i < els.length; i++) {
Element.show(els[i]);
Jean-Philippe Lang
SCM browser:...
r855 if (els[i].hasClassName('loaded') && !els[i].hasClassName('collapsed')) {
expandScmEntry(els[i].id);
}
Jean-Philippe Lang
SCM browser: directories can now be collapsed and re-expanded with no additional request....
r850 }
$(id).addClassName('open');
}
function scmEntryClick(id) {
el = $(id);
if (el.hasClassName('open')) {
collapseScmEntry(id);
Jean-Philippe Lang
SCM browser:...
r855 el.addClassName('collapsed');
Jean-Philippe Lang
SCM browser: directories can now be collapsed and re-expanded with no additional request....
r850 return false;
} else if (el.hasClassName('loaded')) {
expandScmEntry(id);
Jean-Philippe Lang
SCM browser:...
r855 el.removeClassName('collapsed');
Jean-Philippe Lang
SCM browser: directories can now be collapsed and re-expanded with no additional request....
r850 return false;
}
Jean-Philippe Lang
SCM browser:...
r855 if (el.hasClassName('loading')) {
return false;
}
el.addClassName('loading');
Jean-Philippe Lang
SCM browser: directories can now be collapsed and re-expanded with no additional request....
r850 return true;
}
function scmEntryLoaded(id) {
Element.addClassName(id, 'open');
Element.addClassName(id, 'loaded');
Jean-Philippe Lang
SCM browser:...
r855 Element.removeClassName(id, 'loading');
Jean-Philippe Lang
SCM browser: directories can now be collapsed and re-expanded with no additional request....
r850 }
Jean-Philippe Lang
Adds a simple API and a standalone script that can be used to forward emails from a local or remote email server to Redmine (#1110)....
r1570 function randomKey(size) {
var chars = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z');
var key = '';
for (i = 0; i < size; i++) {
key += chars[Math.floor(Math.random() * chars.length)];
}
return key;
}
Jean-Philippe Lang
Adds subtasking (#443) including:...
r3459 function observeParentIssueField(url) {
new Ajax.Autocompleter('issue_parent_issue_id',
'parent_issue_candidates',
url,
{ minChars: 3,
frequency: 0.5,
paramName: 'q',
updateElement: function(value) {
document.getElementById('issue_parent_issue_id').value = value.id;
}});
}
Jean-Philippe Lang
Added an ajax indicator for all ajax calls. Also removed highlight effects on my page layout edition....
r482 /* shows and hides ajax indicator */
Ajax.Responders.register({
onCreate: function(){
if ($('ajax-indicator') && Ajax.activeRequestCount > 0) {
Element.show('ajax-indicator');
}
},
onComplete: function(){
if ($('ajax-indicator') && Ajax.activeRequestCount == 0) {
Element.hide('ajax-indicator');
}
}
});
Jean-Philippe Lang
Fixed: changing user/roles of project member not possible without javascript (#4852)...
r3369
Eric Davis
Hide the role forms when editing or adding Project members. #5452...
r3670 function hideOnLoad() {
Jean-Philippe Lang
Fixed: changing user/roles of project member not possible without javascript (#4852)...
r3369 $$('.hol').each(function(el) {
el.hide();
});
Eric Davis
Hide the role forms when editing or adding Project members. #5452...
r3670 }
Event.observe(window, 'load', hideOnLoad);