Permalink
Browse files

MINOR Fixed SecurityAdmin styling

  • Loading branch information...
1 parent aff72e7 commit ef514b924ea82fad87b2c7b0b357069522471c09 @chillu chillu committed Jan 7, 2012
@@ -95,6 +95,10 @@ function getEditForm($id = null) {
} else {
$form = $this->RootForm();
}
+
+ $form->setTemplate($this->getTemplatesWithSuffix('_EditForm'));
+ if($form->Fields()->hasTabset()) $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet');
+ $form->addExtraClass('center ss-tabset ' . $this->BaseCSSClasses());
return $form;
}
@@ -176,16 +180,14 @@ function RootForm() {
function AddForm() {
$form = parent::AddForm();
- $form->Actions()->fieldByName('action_doAdd')->setTitle(_t('AssetAdmin.ActionAdd', 'Add folder'));
+ $form->Actions()->fieldByName('action_doAdd')->setTitle(_t('SecurityAdmin.ActionAdd', 'Add group'));
return $form;
}
public function memberimport() {
Requirements::clear();
- Requirements::css(SAPPHIRE_DIR . '/css/Form.css');
- Requirements::css(CMS_DIR . '/css/typography.css');
- Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/cms_right.css');
+ Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/screen.css');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery-livequery/jquery.livequery.js');
Requirements::javascript(SAPPHIRE_DIR . '/javascript/jquery_improvements.js');
@@ -194,7 +196,8 @@ public function memberimport() {
Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/MemberImportForm.js');
return $this->renderWith('BlankPage', array(
- 'Form' => $this->MemberImportForm()
+ 'Form' => $this->MemberImportForm(),
+ 'Content' => ' '
));
}
@@ -216,9 +219,7 @@ public function MemberImportForm() {
public function groupimport() {
Requirements::clear();
- Requirements::css(SAPPHIRE_DIR . '/css/Form.css');
- Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/typography.css');
- Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/cms_right.css');
+ Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/screen.css');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery-livequery/jquery.livequery.js');
Requirements::javascript(SAPPHIRE_DIR . '/javascript/jquery_improvements.js');
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -0,0 +1,15 @@
+.SecurityAdmin {
+ .cms-edit-form .cms-content-header h2 {
+ display: none;
+ }
+
+ // Same rules in .member-profile-form
+ .permissioncheckboxset {
+ .optionset {
+ li {
+ float: none;
+ width: auto;
+ }
+ }
+ }
+}
View
@@ -47,3 +47,4 @@
@import "tree.scss";
@import "menu.scss";
@import "ModelAdmin.scss";
+@import "SecurityAdmin.scss";
@@ -14,56 +14,6 @@
</div>
- <% with EditForm %>
- <div class="cms-content-fields center ui-widget-content ss-tabset">
+ $EditForm
- <% if IncludeFormTag %>
- <form $FormAttributes data-layout="{type: 'border'}">
- <% end_if %>
-
- <div class="cms-content-header north">
- <% if Fields.hasTabset %>
- <% with Fields.fieldByName('Root') %>
- <div class="cms-content-header-tabs">
- <ul>
- <% control Tabs %>
- <li><a href="#$id">$Title</a></li>
- <% end_control %>
- </ul>
- </div>
- <% end_with %>
- <% end_if %>
- </div>
-
- <div class="cms-content-fields center">
- <% if Message %>
- <p id="{$FormName}_error" class="message $MessageType">$Message</p>
- <% else %>
- <p id="{$FormName}_error" class="message $MessageType" style="display: none"></p>
- <% end_if %>
-
- <fieldset>
- <% if Legend %><legend>$Legend</legend><% end_if %>
- <% control Fields %>
- $FieldHolder
- <% end_control %>
- <div class="clear"><!-- --></div>
- </fieldset>
- </div>
-
- <div class="cms-content-actions south">
- <% if Actions %>
- <div class="Actions">
- <% control Actions %>
- $Field
- <% end_control %>
- </div>
- <% end_if %>
- </div>
-
- <% if IncludeFormTag %>
- </form>
- <% end_if %>
- </div>
- <% end_with %>
</div>
@@ -42,7 +42,8 @@
$('.permissioncheckboxset .valCMS_ACCESS_LeftAndMain input').entwine({
getCheckboxesExceptThisOne: function() {
return $(this).parents('.field:eq(0)').find('li').filter(function(i) {
- return ($(this).attr('class').match(/CMS_ACCESS_/));
+ var klass = $(this).attr('class');
+ return (klass ? klass.match(/CMS_ACCESS_/) : false);
}).find('.checkbox').not(this);
},
onmatch: function() {
View
@@ -366,8 +366,6 @@ public function login() {
// only display tabs when more than one authenticator is provided
// to save bandwidth and reduce the amount of custom styling needed
if(count($forms) > 1) {
- Requirements::css(SAPPHIRE_DIR . "/css/Form.css");
-
// Needed because the <base href=".."> in the template makes problems
// with the tabstrip library otherwise
$link_base = Director::absoluteURL($this->Link("login"));

0 comments on commit ef514b9

Please sign in to comment.