Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[per-object-permissions] Added "Apply Selected" button to RLP table t…
…hat submits the selected row levle permissions to be changed. git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3578 bcc190cf-cafb-0310-a4f2-bffc1f526a37
- Loading branch information
Christopher Long
committed
Aug 13, 2006
1 parent
03e1b7f
commit 4f01189
Showing
2 changed files
with
43 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,31 @@ | ||
var row_level_permission = { | ||
|
||
|
||
copyToNew: function (id) | ||
{ | ||
var newForm = add_row_level_permission.form; | ||
var newForm = document.getElementById("addRLPForm"); | ||
var form = document.getElementById("editRLPForm-"+id); | ||
newForm.owner.selectedIndex = form.owner.selectedIndex; | ||
newForm.perm.selectedIndex = form.perm.selectedIndex; | ||
newForm.negative.checked = form.negative.checked; | ||
} | ||
}, | ||
|
||
apply_selected: function () | ||
{ | ||
var eleList = document.getElementsByName("apply_checkbox"); | ||
var formList = []; | ||
for(var i=0; eleList.length; i++) | ||
{ | ||
var ele = eleList[i]; | ||
if(ele.tagName == "INPUT") { | ||
if(ele.checked) { | ||
ele.form.submit(); | ||
} | ||
} | ||
} | ||
return false; | ||
}, | ||
|
||
init: function() { | ||
|
||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters