Feature #43: Specify Admins at Initial Config
Disco Administrators can be specified during the Initial Configuration
This commit is contained in:
@@ -141,6 +141,7 @@ else
|
||||
}
|
||||
|
||||
updateNoSubjects();
|
||||
return false;
|
||||
}
|
||||
|
||||
function add() {
|
||||
@@ -152,7 +153,7 @@ else
|
||||
data: { Id: id }
|
||||
}).done(function (response) {
|
||||
if (response) {
|
||||
if (list.find('li[data-subjectid="' + response.Id + '"]').length == 0) {
|
||||
if (list.find('li[data-subjectid="' + response.Id.replace('\\', '\\\\') + '"]').length == 0) {
|
||||
|
||||
var liIcon = $('<i>').addClass('fa fa-lg');
|
||||
if (response.Type === 'user')
|
||||
@@ -180,6 +181,7 @@ else
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Error: ' + errorThrown);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function updateNoSubjects() {
|
||||
@@ -218,4 +220,4 @@ else
|
||||
<div class="actionBar">
|
||||
<a id="Config_AuthRoles_UpdateAdministrators" href="#" class="button">Update Disco Administrators [@Model.AdministratorSubjects.Count]</a>
|
||||
@Html.ActionLinkButton("Create Authorization Role", MVC.Config.AuthorizationRole.Create())
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -412,11 +412,11 @@ WriteLiteral("\',\r\n minLength: 2,\r\n
|
||||
");\r\n\r\n if ($this.is(\'[data-subjectstatus=\"new\"]\')) {\r\n " +
|
||||
" $this.remove();\r\n } else {\r\n $this.attr(\'data-subject" +
|
||||
"status\', \'removed\').hide();\r\n }\r\n\r\n updateNoSubjects();\r\n " +
|
||||
" }\r\n\r\n function add() {\r\n var id = textAdd.val();\r\n\r\n " +
|
||||
" $.ajax({\r\n url: \'");
|
||||
" return false;\r\n }\r\n\r\n function add() {\r\n var" +
|
||||
" id = textAdd.val();\r\n\r\n $.ajax({\r\n url: \'");
|
||||
|
||||
|
||||
#line 150 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
|
||||
#line 151 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
|
||||
Write(Url.Action(MVC.API.AuthorizationRole.Subject()));
|
||||
|
||||
|
||||
@@ -424,35 +424,35 @@ WriteLiteral("\',\r\n minLength: 2,\r\n
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n method: \'post\',\r\n data: { Id: id }\r\n " +
|
||||
" }).done(function (response) {\r\n if (response) {\r\n " +
|
||||
" if (list.find(\'li[data-subjectid=\"\' + response.Id + \'\"]\').length == 0) {\r\n" +
|
||||
"\r\n var liIcon = $(\'<i>\').addClass(\'fa fa-lg\');\r\n " +
|
||||
" if (response.Type === \'user\')\r\n liIcon" +
|
||||
".addClass(\'fa-user\');\r\n else\r\n " +
|
||||
" liIcon.addClass(\'fa-users\');\r\n\r\n var li = $(\'<li>\')\r\n " +
|
||||
" .append(liIcon)\r\n .append($(" +
|
||||
"\'<span>\').text(response.Id == response.Name ? response.Id : response.Name + \' [\'" +
|
||||
" + response.Id + \']\'))\r\n .append($(\'<i>\').addClass(\'f" +
|
||||
"a fa-times-circle remove\'))\r\n .addClass(response.Type" +
|
||||
")\r\n .attr(\'data-subjectid\', response.Id)\r\n " +
|
||||
" .attr(\'data-subjectstatus\', \'new\');\r\n\r\n " +
|
||||
"list.append(li);\r\n\r\n updateNoSubjects();\r\n " +
|
||||
" } else {\r\n alert(\'That subject has already been adde" +
|
||||
"d\');\r\n }\r\n } else {\r\n alert" +
|
||||
"(\'Unknown Id\');\r\n }\r\n }).fail(function (jqXHR, textSta" +
|
||||
"tus, errorThrown) {\r\n alert(\'Error: \' + errorThrown);\r\n " +
|
||||
" });\r\n }\r\n\r\n function updateNoSubjects() {\r\n if (l" +
|
||||
"ist.find(\'li:visible\').length > 0)\r\n noSubjects.hide();\r\n " +
|
||||
" else\r\n noSubjects.show();\r\n }\r\n\r\n function save" +
|
||||
"Changes() {\r\n var form = $(\'#Config_AuthRoles_Subjects_Update_Dialog_" +
|
||||
"Form\').empty();\r\n\r\n list.find(\'li[data-subjectstatus!=\"removed\"]\').ea" +
|
||||
"ch(function () {\r\n var subjectId = $(this).attr(\'data-subjectid\')" +
|
||||
";\r\n\r\n form.append($(\'<input>\').attr({\r\n \'name\'" +
|
||||
": \'Subjects\',\r\n \'type\': \'hidden\'\r\n }).val(subj" +
|
||||
"ectId));\r\n\r\n }).get();\r\n\r\n form.submit();\r\n\r\n d" +
|
||||
"ialog.dialog(\"disable\");\r\n dialog.dialog(\"option\", \"buttons\", null);\r" +
|
||||
"\n }\r\n\r\n $(function () {\r\n $(\'#Config_AuthRoles_UpdateAd" +
|
||||
"ministrators\').click(showDialog);\r\n });\r\n\r\n })();\r\n</script>\r\n<!-- #en" +
|
||||
"dregion -->\r\n<div");
|
||||
" if (list.find(\'li[data-subjectid=\"\' + response.Id.replace(\'\\\\\', \'\\\\\\\\\') + " +
|
||||
"\'\"]\').length == 0) {\r\n\r\n var liIcon = $(\'<i>\').addClass(\'" +
|
||||
"fa fa-lg\');\r\n if (response.Type === \'user\')\r\n " +
|
||||
" liIcon.addClass(\'fa-user\');\r\n else\r\n " +
|
||||
" liIcon.addClass(\'fa-users\');\r\n\r\n v" +
|
||||
"ar li = $(\'<li>\')\r\n .append(liIcon)\r\n " +
|
||||
" .append($(\'<span>\').text(response.Id == response.Name ? response.Id " +
|
||||
": response.Name + \' [\' + response.Id + \']\'))\r\n .appen" +
|
||||
"d($(\'<i>\').addClass(\'fa fa-times-circle remove\'))\r\n ." +
|
||||
"addClass(response.Type)\r\n .attr(\'data-subjectid\', res" +
|
||||
"ponse.Id)\r\n .attr(\'data-subjectstatus\', \'new\');\r\n\r\n " +
|
||||
" list.append(li);\r\n\r\n updateNoSubjec" +
|
||||
"ts();\r\n } else {\r\n alert(\'That subject" +
|
||||
" has already been added\');\r\n }\r\n } else {\r\n " +
|
||||
" alert(\'Unknown Id\');\r\n }\r\n }).fail(fu" +
|
||||
"nction (jqXHR, textStatus, errorThrown) {\r\n alert(\'Error: \' + err" +
|
||||
"orThrown);\r\n });\r\n return false;\r\n }\r\n\r\n " +
|
||||
" function updateNoSubjects() {\r\n if (list.find(\'li:visible\').leng" +
|
||||
"th > 0)\r\n noSubjects.hide();\r\n else\r\n n" +
|
||||
"oSubjects.show();\r\n }\r\n\r\n function saveChanges() {\r\n va" +
|
||||
"r form = $(\'#Config_AuthRoles_Subjects_Update_Dialog_Form\').empty();\r\n\r\n " +
|
||||
" list.find(\'li[data-subjectstatus!=\"removed\"]\').each(function () {\r\n " +
|
||||
" var subjectId = $(this).attr(\'data-subjectid\');\r\n\r\n form.a" +
|
||||
"ppend($(\'<input>\').attr({\r\n \'name\': \'Subjects\',\r\n " +
|
||||
" \'type\': \'hidden\'\r\n }).val(subjectId));\r\n\r\n })." +
|
||||
"get();\r\n\r\n form.submit();\r\n\r\n dialog.dialog(\"disable\");\r\n " +
|
||||
" dialog.dialog(\"option\", \"buttons\", null);\r\n }\r\n\r\n $(fun" +
|
||||
"ction () {\r\n $(\'#Config_AuthRoles_UpdateAdministrators\').click(showDi" +
|
||||
"alog);\r\n });\r\n\r\n })();\r\n</script>\r\n<!-- #endregion -->\r\n<div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
@@ -467,7 +467,7 @@ WriteLiteral(" class=\"button\"");
|
||||
WriteLiteral(">Update Disco Administrators [");
|
||||
|
||||
|
||||
#line 219 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
|
||||
#line 221 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
|
||||
Write(Model.AdministratorSubjects.Count);
|
||||
|
||||
|
||||
@@ -478,13 +478,13 @@ WriteLiteral("]</a>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 220 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
|
||||
#line 222 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Create Authorization Role", MVC.Config.AuthorizationRole.Create()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</div>");
|
||||
WriteLiteral("\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,11 +50,11 @@
|
||||
var displayName = sg.Id == sg.Name ? sg.Id : string.Format("{0} [{1}]", sg.Name, sg.Id);
|
||||
<li class="@(sg.IsGroup ? "group" : "user")">@if (sg.IsGroup)
|
||||
{
|
||||
<i class="fa fa-users fa-lg"></i>@displayName
|
||||
<i class="fa fa-users fa-lg"></i>@displayName
|
||||
}
|
||||
else
|
||||
{
|
||||
<a href="@(Url.Action(MVC.User.Show(sg.Id)))#UserDetailTab-Authorization"><i class="fa fa-user fa-lg"></i>@displayName</a>
|
||||
<a href="@(Url.Action(MVC.User.Show(sg.Id)))#UserDetailTab-Authorization"><i class="fa fa-user fa-lg"></i>@displayName</a>
|
||||
}</li>
|
||||
}
|
||||
</ul>
|
||||
@@ -69,13 +69,13 @@
|
||||
{
|
||||
var displayName = sg.Id == sg.Name ? sg.Id : string.Format("{0} [{1}]", sg.Name, sg.Id);
|
||||
<li class="@(sg.IsGroup ? "group" : "user")" data-subjectid="@sg.Id">@if (sg.IsGroup)
|
||||
{
|
||||
<i class="fa fa-users fa-lg"></i>@displayName
|
||||
}
|
||||
else
|
||||
{
|
||||
<i class="fa fa-user fa-lg"></i>@displayName
|
||||
}<i class="fa fa-times-circle remove"></i></li>
|
||||
{
|
||||
<i class="fa fa-users fa-lg"></i>@displayName
|
||||
}
|
||||
else
|
||||
{
|
||||
<i class="fa fa-user fa-lg"></i>@displayName
|
||||
}<i class="fa fa-times-circle remove"></i></li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
@@ -174,7 +174,7 @@
|
||||
data: { Id: id }
|
||||
}).done(function(response){
|
||||
if (response){
|
||||
if (list.find('li[data-subjectid="'+response.Id+'"]').length == 0){
|
||||
if (list.find('li[data-subjectid="'+response.Id.replace('\\', '\\\\')+'"]').length == 0){
|
||||
|
||||
var liIcon = $('<i>').addClass('fa fa-lg');
|
||||
if (response.Type === 'user')
|
||||
|
||||
@@ -211,7 +211,7 @@ WriteLiteral(">");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-users fa-lg\"");
|
||||
|
||||
@@ -219,20 +219,20 @@ WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
Write(displayName);
|
||||
Write(displayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -240,17 +240,17 @@ WriteLiteral("></i>");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 2766), Tuple.Create("\"", 2836)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 2676), Tuple.Create("\"", 2746)
|
||||
|
||||
#line 57 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2773), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.User.Show(sg.Id))
|
||||
, Tuple.Create(Tuple.Create("", 2683), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.User.Show(sg.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2773), false)
|
||||
, Tuple.Create(Tuple.Create("", 2808), Tuple.Create("#UserDetailTab-Authorization", 2808), true)
|
||||
, 2683), false)
|
||||
, Tuple.Create(Tuple.Create("", 2718), Tuple.Create("#UserDetailTab-Authorization", 2718), true)
|
||||
);
|
||||
|
||||
WriteLiteral("><i");
|
||||
@@ -261,7 +261,7 @@ WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 57 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
Write(displayName);
|
||||
Write(displayName);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -343,14 +343,14 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 3887), Tuple.Create("\"", 3927)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 3797), Tuple.Create("\"", 3837)
|
||||
|
||||
#line 71 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3895), Tuple.Create<System.Object, System.Int32>(sg.IsGroup ? "group" : "user"
|
||||
, Tuple.Create(Tuple.Create("", 3805), Tuple.Create<System.Object, System.Int32>(sg.IsGroup ? "group" : "user"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3895), false)
|
||||
, 3805), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-subjectid=\"");
|
||||
@@ -369,12 +369,12 @@ WriteLiteral(">");
|
||||
|
||||
#line 71 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
if (sg.IsGroup)
|
||||
{
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-users fa-lg\"");
|
||||
|
||||
@@ -382,28 +382,28 @@ WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 73 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 73 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
Write(displayName);
|
||||
Write(displayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 73 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-user fa-lg\"");
|
||||
|
||||
@@ -411,21 +411,21 @@ WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 77 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 77 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
Write(displayName);
|
||||
Write(displayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 77 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -465,14 +465,14 @@ WriteLiteral(">Add</a>\r\n </div>\r\n
|
||||
|
||||
WriteLiteral(" id=\"Config_AuthRoles_Subjects_Update_Dialog_Form\"");
|
||||
|
||||
WriteAttribute("action", Tuple.Create(" action=\"", 5172), Tuple.Create("\"", 5269)
|
||||
WriteAttribute("action", Tuple.Create(" action=\"", 5168), Tuple.Create("\"", 5265)
|
||||
|
||||
#line 86 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5181), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.AuthorizationRole.UpdateSubjects(Model.Token.Role.Id, null, true))
|
||||
, Tuple.Create(Tuple.Create("", 5177), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.AuthorizationRole.UpdateSubjects(Model.Token.Role.Id, null, true))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5181), false)
|
||||
, 5177), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" method=\"post\"");
|
||||
@@ -552,49 +552,49 @@ WriteLiteral("\',\r\n minLength: 2,\r
|
||||
WriteLiteral("\',\r\n method: \'post\',\r\n " +
|
||||
" data: { Id: id }\r\n }).done(function(r" +
|
||||
"esponse){\r\n if (response){\r\n " +
|
||||
" if (list.find(\'li[data-subjectid=\"\'+response.Id+\'\"]\').len" +
|
||||
"gth == 0){\r\n \r\n " +
|
||||
" var liIcon = $(\'<i>\').addClass(\'fa fa-lg\');\r\n " +
|
||||
" if (response.Type === \'user\')\r\n " +
|
||||
" liIcon.addClass(\'fa-user\');\r\n " +
|
||||
" else\r\n liI" +
|
||||
"con.addClass(\'fa-users\');\r\n\r\n var li " +
|
||||
"= $(\'<li>\')\r\n .append(liIcon)\r\n " +
|
||||
" .append($(\'<span>\').text(response." +
|
||||
"Id == response.Name ? response.Id : response.Name + \' [\' + response.Id + \']\'))\r" +
|
||||
"\n .append($(\'<i>\').addClass(\'fa f" +
|
||||
"a-times-circle remove\'))\r\n .addCl" +
|
||||
"ass(response.Type)\r\n .attr(\'data-" +
|
||||
"subjectid\', response.Id)\r\n .attr(" +
|
||||
"\'data-subjectstatus\', \'new\');\r\n\r\n lis" +
|
||||
"t.append(li);\r\n\r\n updateNoSubjects();" +
|
||||
" \r\n " +
|
||||
" }else{\r\n alert(\'That subject has al" +
|
||||
"ready been added\');\r\n }\r\n " +
|
||||
" }else{\r\n alert(\'Unkno" +
|
||||
"wn Id\');\r\n }\r\n " +
|
||||
" }).fail(function(jqXHR, textStatus, errorThrown){\r\n " +
|
||||
" alert(\'Error: \' + errorThrown);\r\n });\r\n " +
|
||||
" }\r\n\r\n function updateNo" +
|
||||
"Subjects(){\r\n if (list.find(\'li:visible\').length " +
|
||||
"> 0)\r\n noSubjects.hide();\r\n " +
|
||||
" else\r\n noSubjects.show();\r\n " +
|
||||
" }\r\n\r\n function saveChanges(){" +
|
||||
"\r\n var form = $(\'#Config_AuthRoles_Subjects_Updat" +
|
||||
"e_Dialog_Form\').empty();\r\n\r\n list.find(\'li[data-s" +
|
||||
"ubjectstatus!=\"removed\"]\').each(function(){\r\n " +
|
||||
" var subjectId = $(this).attr(\'data-subjectid\');\r\n " +
|
||||
" \r\n form.append($(\'<input>\').attr({\r\n " +
|
||||
" \'name\': \'Subjects\',\r\n " +
|
||||
" \'type\': \'hidden\'\r\n }).val(s" +
|
||||
"ubjectId));\r\n\r\n }).get();\r\n\r\n " +
|
||||
" form.submit();\r\n\r\n dialog.dialog(\"dis" +
|
||||
"able\");\r\n dialog.dialog(\"option\", \"buttons\", null" +
|
||||
");\r\n }\r\n\r\n $(function(){\r\n" +
|
||||
" $(\'#Config_AuthRoles_Subjects_Update\').click(sho" +
|
||||
"wDialog);\r\n });\r\n\r\n })();\r\n " +
|
||||
" </script>\r\n </div>\r\n </td>\r\n <" +
|
||||
"/tr>\r\n <tr>\r\n <td");
|
||||
" if (list.find(\'li[data-subjectid=\"\'+response.Id.replace(\'" +
|
||||
"\\\\\', \'\\\\\\\\\')+\'\"]\').length == 0){\r\n \r\n" +
|
||||
" var liIcon = $(\'<i>\').addClass(\'fa f" +
|
||||
"a-lg\');\r\n if (response.Type === \'user" +
|
||||
"\')\r\n liIcon.addClass(\'fa-user\');\r" +
|
||||
"\n else\r\n " +
|
||||
" liIcon.addClass(\'fa-users\');\r\n\r\n " +
|
||||
" var li = $(\'<li>\')\r\n " +
|
||||
" .append(liIcon)\r\n .append($(\'<" +
|
||||
"span>\').text(response.Id == response.Name ? response.Id : response.Name + \' [\' " +
|
||||
"+ response.Id + \']\'))\r\n .append($" +
|
||||
"(\'<i>\').addClass(\'fa fa-times-circle remove\'))\r\n " +
|
||||
" .addClass(response.Type)\r\n " +
|
||||
" .attr(\'data-subjectid\', response.Id)\r\n " +
|
||||
" .attr(\'data-subjectstatus\', \'new\');\r\n\r\n " +
|
||||
" list.append(li);\r\n\r\n " +
|
||||
" updateNoSubjects(); \r\n " +
|
||||
" }else{\r\n aler" +
|
||||
"t(\'That subject has already been added\');\r\n " +
|
||||
" }\r\n }else{\r\n " +
|
||||
" alert(\'Unknown Id\');\r\n }\r\n " +
|
||||
" }).fail(function(jqXHR, textStatus, errorThrown){\r\n " +
|
||||
" alert(\'Error: \' + errorThrown);\r\n " +
|
||||
" });\r\n }\r\n\r\n " +
|
||||
" function updateNoSubjects(){\r\n if (list.find" +
|
||||
"(\'li:visible\').length > 0)\r\n noSubjects.hide(" +
|
||||
");\r\n else\r\n no" +
|
||||
"Subjects.show();\r\n }\r\n\r\n f" +
|
||||
"unction saveChanges(){\r\n var form = $(\'#Config_Au" +
|
||||
"thRoles_Subjects_Update_Dialog_Form\').empty();\r\n\r\n " +
|
||||
" list.find(\'li[data-subjectstatus!=\"removed\"]\').each(function(){\r\n " +
|
||||
" var subjectId = $(this).attr(\'data-subjectid\');\r\n " +
|
||||
" \r\n form.append($(" +
|
||||
"\'<input>\').attr({\r\n \'name\': \'Subjects\',\r\n" +
|
||||
" \'type\': \'hidden\'\r\n " +
|
||||
" }).val(subjectId));\r\n\r\n }).get();\r\n" +
|
||||
"\r\n form.submit();\r\n\r\n " +
|
||||
" dialog.dialog(\"disable\");\r\n dialog.dialog(\"op" +
|
||||
"tion\", \"buttons\", null);\r\n }\r\n\r\n " +
|
||||
" $(function(){\r\n $(\'#Config_AuthRoles_Subje" +
|
||||
"cts_Update\').click(showDialog);\r\n });\r\n\r\n " +
|
||||
" })();\r\n </script>\r\n </div>\r\n " +
|
||||
" </td>\r\n </tr>\r\n <tr>\r\n <td");
|
||||
|
||||
WriteLiteral(" colspan=\"2\"");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user