--HG--
branch : dev
This commit is contained in:
Andre Rodrigues
2010-11-05 16:42:41 -07:00
10 changed files with 75 additions and 83 deletions

View File

@@ -1,10 +1,6 @@
.summary .content-localization {
margin: .7em 0;
}
.content-localization .content-localizations li,
.content-localization .add-localization {
font-size:1.4em;
}
.content-localization .culture-selected {
margin-bottom:.5em;
}

View File

@@ -103,14 +103,14 @@
_controllees.hide(); // <- unhook this when the following comment applies
$(_controllees.show()[0]).find("input").focus(); // <- aaaand a slideDown there...eventually
} else if (!(_this.is(":checked") && _controlleesAreHidden)) {
//_controllees.slideUp(200); <- hook this back up when chrome behaves, or when I care less
//_controllees.slideUp(200); <- hook this back up when chrome behaves, or when I care less...or when chrome behaves
_controllees.hide()
}
return this;
}
});
// collapsable areas - anything with a data-controllerid attribute has its visibility controlled by the id-ed radio/checkbox
(function () {
$(function () {
$("[data-controllerid]").each(function () {
var controller = $("#" + $(this).attr("data-controllerid"));
if (controller.data("isControlling")) {
@@ -126,11 +126,12 @@
$("[name=" + controller.attr("name") + "]").click(function () { $("[name=" + $(this).attr("name") + "]").each($(this).toggleWhatYouControl); });
}
});
})();
});
// inline form link buttons (form.inline.link button) swapped out for a link that submits said form
(function () {
$(function () {
$("form.inline.link").each(function () {
var _this = $(this);
console.log(_this.html())
var link = $("<a class='wasFormInlineLink' href='.'/>");
var button = _this.children("button").first();
link.text(button.text())
@@ -141,7 +142,7 @@
_this.css({ "position": "absolute", "left": "-9999em" });
$("body").append(_this);
});
})();
});
// (do) a little better autofocus
$(function () {
$("body").helpfullyFocus();

View File

@@ -14,9 +14,6 @@
}
.features.summary-view .feature {
border:1px solid #EAEAEA;
box-shadow: 0px 1px 2px #d6d6d6;
-moz-box-shadow: 0px 1px 2px #d6d6d6;
-webkit-box-shadow: 0px 1px 2px #d6d6d6;
display:block;
float:left;
height:6em;
@@ -93,10 +90,6 @@
.features.detail-view .description::before {
content:" - ";
}
.features .dependencies li,
.features .actions {
font-size:1.4em;
}
.features .dependencies {
font-size:.9em;
margin:.44em 0 0;

View File

@@ -148,6 +148,11 @@ namespace Orchard.Roles.Controllers {
[HttpPost, ActionName("Edit")]
[FormValueRequired("submit.Delete")]
public ActionResult EditDeletePOST(int id) {
return Delete(id, null);
}
[HttpPost]
public ActionResult Delete(int id, string returnUrl) {
if (!Services.Authorizer.Authorize(Permissions.ManageRoles, T("Not authorized to manage roles")))
return new HttpUnauthorizedResult();
@@ -155,6 +160,10 @@ namespace Orchard.Roles.Controllers {
_roleService.DeleteRole(id);
Services.Notifier.Information(T("Role was successfully deleted."));
if (!string.IsNullOrWhiteSpace(returnUrl))
return Redirect(returnUrl);
return RedirectToAction("Index");
} catch (Exception exception) {
Services.Notifier.Error(T("Editing Role failed: {0}", exception.Message));

View File

@@ -6,7 +6,13 @@
<fieldset>
<legend>@T("Information")</legend>
<label for="pageTitle">@T("Role Name:")</label>
<input id="Name" class="text" name="Name" type="text" value="@Model.Name" />
@if (Model.Name == "Administrator") { // the one special case
<input id="Name" class="text" type="text" value="@Model.Name" readonly="readonly" />
<input class="text" name="Name" type="hidden" value="@Model.Name" />
}
else {
<input id="Name" class="text" name="Name" type="text" value="@Model.Name" />
}
<input type="hidden" value="@Model.Id" name="Id" />
</fieldset>
<fieldset>
@@ -51,6 +57,8 @@
</fieldset>
<fieldset>
<button class="primaryAction" type="submit" name="submit.Save" value="@T("Save")">@T("Save")</button>
@if (Model.Name != "Administrator") {
<button type="submit" name="submit.Delete" value="@T("Remove")">@T("Remove")</button>
}
</fieldset>
}

View File

@@ -1,5 +1,9 @@
@model RolesIndexViewModel
@using Orchard.Roles.ViewModels;
@using Orchard.Utility.Extensions;
@{
Script.Require("ShapesBase");
}
<h1>@Html.TitleForPage(T("Manage Roles").ToString())</h1>
@using(Html.BeginFormAntiForgeryPost()) {
@@ -29,8 +33,14 @@
@foreach (var row in Model.Rows) {
<tr>
<td><input type="checkbox" value="true" name="@("Checkbox." + row.Id)"/></td>
<td>@row.Name</td>
<td>@Html.ActionLink(T("Edit").ToString(), "Edit", new { row.Id })</td>
<td>@Html.ActionLink(row.Name, "Edit", new { row.Id })</td>
<td>
@Html.ActionLink(T("Edit").ToString(), "Edit", new { row.Id })
@if (row.Name != "Administrator") {
@T(" | ")
<a href="@Url.Action("Delete", new {row.Id, returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString()})" itemprop="RemoveUrl UnsafeUrl">@T("Remove")</a>
}
</td>
</tr>
}
</table>

View File

@@ -111,6 +111,24 @@ namespace Orchard.Tags.Controllers {
return RedirectToAction("Index");
}
[HttpPost]
public ActionResult Remove(int id, string returnUrl) {
if (!Services.Authorizer.Authorize(Permissions.ManageTags, T("Couldn't remove tag")))
return new HttpUnauthorizedResult();
Tag tag = _tagService.GetTag(id);
if (tag == null)
return new HttpNotFoundResult();
_tagService.DeleteTag(id);
if (!string.IsNullOrWhiteSpace(returnUrl))
return Redirect(returnUrl);
return RedirectToAction("Index");
}
public ActionResult Search(int id) {
Tag tag = _tagService.GetTag(id);

View File

@@ -1,11 +1,13 @@
@model Orchard.Tags.ViewModels.TagsAdminIndexViewModel
@using Orchard.Tags.ViewModels;
@using Orchard.Utility.Extensions;
@{
Script.Require("ShapesBase");
}
<h1>@Html.TitleForPage(T("Manage Tags").ToString()) </h1>
@using(Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary()
<fieldset class="bulk-actions">
<label for="publishActions">@T("Actions:")</label>
<select id="publishActions" name="@Html.NameOf(m => m.BulkAction)">
@@ -14,7 +16,6 @@
</select>
<button type="submit"name="submit.BulkEdit" value="@T("Apply")">@T("Apply")</button>
</fieldset>
<div class="manage">@Html.ActionLink(T("Add a tag").ToString(), "Create", new { }, new { @class = "button primaryAction" })</div>
<fieldset>
<table class="items" summary="@T("This is a table of the tags in your application")" >
@@ -36,13 +37,15 @@
<input type="checkbox" value="true" name="@Html.NameOf(m => m.Tags[tagIndex].IsChecked)"/>
</td>
<td>
@Html.ActionLink(Html.Encode(tagEntry.Tag.TagName), "Search", new {id = tagEntry.Tag.Id})
@Html.ActionLink(tagEntry.Tag.TagName, "Edit", new {id = tagEntry.Tag.Id})
</td>
<td>
@Html.ActionLink(T("Edit").ToString(), "Edit", new {id = tagEntry.Tag.Id})
@Html.ActionLink(T("Edit").ToString(), "Edit", new {id = tagEntry.Tag.Id}) @T(" | ")
<a href="@Url.Action("Remove", new {tagEntry.Tag.Id, returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString()})" itemprop="RemoveUrl UnsafeUrl">@T("Remove")</a>
</td>
</tr>
tagIndex = tagIndex + 1;
}
</table>
</fieldset>
</fieldset>
}

View File

@@ -27,7 +27,6 @@ h4.widgets-layer-header {
.widgets-availableWidgets table.items th
{
background: #f1f1f1;
font-size:1.6em;
padding:.5em 0 .3em .2em;
}
@@ -39,7 +38,6 @@ h4.widgets-layer-header {
}
.widgets-layerZones {
font-size: 1.4em;
float: left;
float: right;
width: 60%;
@@ -76,7 +74,6 @@ h4.widgets-layer-header {
}
.widgets-layers {
font-size: 1.4em;
border:1px solid #ccc;
border-right:none;
}

View File

@@ -119,7 +119,7 @@ body {
/* Headings */
h1,h2,h3,h4,h5,h6 { font-weight: normal;}
h1 { font-size: 1.231em; }
h1 { font-size: 1.308em; }
h2, h2 span { font-size: 1.154em; }
h3 { font-size: 1.077em; }
h4 { font-size: 1em; }
@@ -399,7 +399,6 @@ form.link button:hover {
margin:.2em 0;
}
#main ul h3 {
font-size:1.6em;
margin:0 0 .2em;
}
@@ -451,8 +450,15 @@ span.message {
content:"DEBUG » ";
}
/* Forms
----------------------------------------------------------*/
/* Forms
***************************************************************/
form { margin: 0; padding: 0; }
legend { font-size: 1.231em; font-weight: normal; margin: 0 0 1.2em 0; border:none; }
fieldset { padding:0em; margin: 0 0 0em 0; border: 0px solid #dbdbdb; }
label { font-weight: normal; display:block; padding: 0 0 0.3em 0; }
label.forcheckbox { margin:0 0 0 .4em; display:inline; }
form.inline, form.inline fieldset { /* todo: (heskew) need something other than .inline ... */
display:inline;
}
@@ -465,10 +471,7 @@ form.inline fieldset {
margin:0 1.4em 0 0;
padding-top:0;
}
legend {
font-size:1.6em;
font-weight:bold;
}
legend span {
font-weight:normal;
}
@@ -666,49 +669,6 @@ button.remove:focus::-moz-focus-inner, .remove.button:focus::-moz-focus-inner {
}
/* Icon buttons
----------------------------------------------------------*/
.ibutton, .ibutton:link, .ibutton:visited,
button.ibutton, button.ibutton:hover, button.ibutton:focus, button.ibutton:active {
background:url(images/icons.png) 0 -20px;
border:0;
display:inline;
float:left;
height:17px;
overflow:hidden;
padding:0 0 0 17px;
width:0;
}
button.ibutton {
text-indent:-9999em;
}
.ibutton:hover, .ibutton:active, .ibutton:focus { background-position:0 0; }
.ibutton.remove,
.ibutton.remove:link,
.ibutton.remove:visited { background-position:-20px -20px; }
.ibutton.remove:hover, .ibutton.remove:active, .ibutton.remove:focus { background-position:-20px 0; }
.ibutton.view,
.ibutton.view:link,
.ibutton.view:visited { background-position:-40px -20px; }
.ibutton.view:hover, .ibutton.view:active, .ibutton.view:focus { background-position:-40px 0; }
.ibutton.add.page,
.ibutton.add.page:link,
.ibutton.add.page:visited { background-position:-60px -20px; }
.ibutton.add.page:hover, .ibutton.add.page:active, .ibutton.add.page:focus { background-position:-60px 0; }
.ibutton.edit,
.ibutton.edit:link,
.ibutton.edit:visited { background-position:-80px -20px; }
.ibutton.edit:hover, .ibutton.edit:active, .ibutton.edit:focus { background-position:-80px 0; }
.ibutton.publish,
.ibutton.publish:link,
.ibutton.publish:visited { background-position:-100px -20px; }
.ibutton.publish:hover, .ibutton.publish:active, .ibutton.publish:focus { background-position:-100px 0; }
.ibutton.blog,
.ibutton.blog:link,
.ibutton.blog:visited { background-position:-120px -20px; }
.ibutton.blog:hover, .ibutton.blog:active, .ibutton.blog:focus { background-position:-120px 0; }
/* (Items) Tables
----------------------------------------------------------*/
table.items {
@@ -836,16 +796,13 @@ table .button {
.contentItems .properties li {
border:0;
float:left;
font-size:1.4em;
padding:0 0 .1em 0;
}
.contentItems .properties .icon {
margin:0 .2em -.2em;
}
.contentItems .related {
text-align:right;
font-size:1.4em;
}
.contentItems .commentcount {
line-height:2em;