Changeset 1859
- Timestamp:
- 07/27/10 13:49:40 (19 months ago)
- Location:
- plugins/apostrophePlugin/branches/features/css
- Files:
-
- 4 modified
-
lib/helper/aHelper.php (modified) (1 diff)
-
modules/a/templates/_area.php (modified) (12 diffs)
-
modules/a/templates/_globalTools.php (modified) (2 diffs)
-
web/css/a-area-slots.css (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
plugins/apostrophePlugin/branches/features/css/lib/helper/aHelper.php
r1717 r1859 17 17 if (sfConfig::get('app_a_use_bundled_stylesheet', true)) 18 18 { 19 $response->addStylesheet('/apostrophePlugin/css/a.css', 'first'); 19 $response->addStylesheet('/apostrophePlugin/css/a-reset.css'); 20 $response->addStylesheet('/apostrophePlugin/css/a-utility.css'); 21 $response->addStylesheet('/apostrophePlugin/css/a-forms.css'); 22 $response->addStylesheet('/apostrophePlugin/css/a-buttons.css'); 23 $response->addStylesheet('/apostrophePlugin/css/a-navigation.css'); 24 $response->addStylesheet('/apostrophePlugin/css/a-components.css'); 25 $response->addStylesheet('/apostrophePlugin/css/a-area-slots.css'); 26 $response->addStylesheet('/apostrophePlugin/css/a-engines.css'); 27 $response->addStylesheet('/apostrophePlugin/css/a-admin.css'); 28 $response->addStylesheet('/apostrophePlugin/css/a-colors.css'); 20 29 } 21 30 -
plugins/apostrophePlugin/branches/features/css/modules/a/templates/_area.php
r1719 r1859 1 1 <?php use_helper('a', 'jQuery', 'I18N') ?> 2 2 3 <?php // We don't replace the area controls on an AJAX refresh, just the contents ?> 4 5 <?php if ($editable): ?> 6 7 <?php slot('a-cancel') ?> 8 <?php if (0): ?> 9 <li class="a-controls-item cancel"> 10 <a href="#" class="a-btn a-cancel a-cancel-area" title="<?php echo __('Cancel', null, 'apostrophe') ?>"><?php echo __('Cancel', null, 'apostrophe') ?></a> 11 </li> 12 <?php endif ?> 13 <?php end_slot() ?> 14 15 <?php slot('a-history-controls') ?> 16 <li class="a-controls-item history"> 3 <?php slot('a-history-controls') ?> 4 <li> 17 5 <?php $moreAjax = "jQuery.ajax({type:'POST',dataType:'html',success:function(data, textStatus){jQuery('#a-history-items-$pageid-$name').html(data);},url:'/admin/a/history/id/".$page->id."/name/$name/all/1'}); return false;"; ?> 18 6 <?php $history_button_style = sfConfig::get('app_a_history_button_style', "no-label big"); ?> … … 29 17 )); ?> 30 18 </li> 31 <?php end_slot() ?> 32 33 <?php endif ?> 19 <?php end_slot() ?> 34 20 35 21 <?php if (!$refresh): ?> 36 <?php // Wraps the whole thing, including the area controls ?> 37 <?php // Existing CSS code often targets the old area IDs, which were a-area-$name. Since ?> 38 <?php // we now have multiple areas with the same name coming from separate virtual pages, ?> 39 <?php // we need the page ID in the DOM ID, which means it can't be used in CSS. Instead we ?> 40 <?php // provide a-area-$name as a class, which should make it easy to change your CSS rules. ?> 41 <?php // It is also possible to explicitly pass an area-class option to an area (or singleton slot). ?> 22 42 23 <div id="a-area-<?php echo "$pageid-$name" ?>" class="a-area <?php echo isset($options['area-class']) ? $options['area-class'] : "a-area-$name" ?>"> 43 24 44 <?php // The area controls ?>25 <?php // Area Controls ?> 45 26 <?php if ($editable): ?> 46 27 <?php if ($infinite): ?> 47 28 48 <ul class="a- controls a-area-controls">29 <ul class="a-ui a-controls a-area-controls"> 49 30 50 31 <?php # Slot Controls ?> 51 <li class="a-controls-item slots">32 <li> 52 33 <?php $addslot_button_style = sfConfig::get('app_a_addslot_button_style', "big"); ?> 53 34 <?php echo link_to_function(__('Add Content', null, 'apostrophe'), "", array('class' => 'a-btn icon a-add a-add-slot '.$addslot_button_style, 'id' => 'a-add-slot-'.$pageid.'-'.$name, )) ?> … … 55 36 <?php include_partial('a/addSlot', array('id' => $page->id, 'name' => $name, 'options' => $options)) ?> 56 37 </ul> 57 58 38 </li> 59 39 <?php include_slot('a-history-controls') ?> 60 <?php include_slot('a-cancel') ?>61 40 </ul> 62 41 <?php endif ?> … … 67 46 68 47 <?php endif ?> 69 70 <?php $i = 0 ?>71 48 72 49 <?php // On an AJAX refresh we are updating a-slots-$pageid-$name, ?> … … 79 56 80 57 <?php // Loop through all of the slots in the area ?> 81 <?php foreach ($slots as $permid => $slot): ?> 82 <?php if ($infinite): ?> 83 <?php if (isset($options['type_options'][$slot->type])): ?> 58 <?php $i = 0; foreach ($slots as $permid => $slot): ?> 59 60 <?php if ($infinite): ?> 61 <?php if (isset($options['type_options'][$slot->type])): ?> 84 62 <?php $slotOptions = $options['type_options'][$slot->type]; ?> 85 63 <?php else: ?> … … 89 67 <?php $slotOptions = $options ?> 90 68 <?php endif ?> 91 <?php $outlineEditableClass = "" ?>92 <?php if ($editable && ((isset($slotOptions['outline_editable']) && $slotOptions['outline_editable']) || $slot->isOutlineEditable())): ?>93 <?php $outlineEditableClass = "a-slot-is-editable" ?>94 <?php endif ?>95 <?php // Generate the content of the CMS slot early and capture it to a ?>96 <?php // Symfony slot so we can insert it at an appropriate point... and we ?>97 <?php // will also insert its slot-specific controls via a separate ?>98 <?php // a-slot-controls-$pageid-$name-$permid slot that the slot implementation ?>99 <?php // provides for us ?>100 69 101 70 <?php slot("a-slot-content-$pageid-$name-$permid") ?> … … 103 72 <?php end_slot() ?> 104 73 105 <?php // Wraps an individual slot, with its controls ?> 106 <div class="a-slot <?php echo $slot->getEffectiveVariant($slotOptions) ?> <?php echo $slot->type ?> <?php echo $outlineEditableClass ?><?php echo ($slot->isNew())? ' a-new-slot':'' ?>" id="a-slot-<?php echo "$pageid-$name-$permid" ?>"> 107 <?php // John shouldn't we suppress this entirely if !$editable? ?> 108 <?php // Controls for that individual slot ?> 74 <!-- START SLOT --> 75 <div class="a-slot <?php echo $slot->getEffectiveVariant($slotOptions) ?> <?php echo $slot->type ?><?php echo ($slot->isNew())? ' a-new-slot':'' ?>" id="a-slot-<?php echo "$pageid-$name-$permid" ?>"> 76 <?php // Slot Controls ?> 109 77 <?php if ($editable): ?> 110 <ul class="a- controls a-slot-controls">78 <ul class="a-ui a-controls a-slot-controls"> 111 79 <?php if ($infinite): ?> 112 80 <?php if ($i > 0): ?> 113 <li class="move-up">81 <li> 114 82 <?php echo jq_link_to_remote(__('Move', null, 'apostrophe'), array( 115 83 "url" => "a/moveSlot?" .http_build_query(array( … … 126 94 </li> 127 95 <?php endif ?> 128 129 96 <?php if (($i + 1) < count($slots)): ?> 130 <li class="move-down">97 <li> 131 98 <?php echo jq_link_to_remote(__('Move', null, 'apostrophe'), array( 132 99 "url" => "a/moveSlot?" .http_build_query(array( … … 149 116 <?php if (!$infinite): ?> 150 117 <?php include_slot('a-history-controls') ?> 151 <?php include_slot('a-cancel') ?>152 118 <?php endif ?> 153 119 154 120 <?php if ($infinite): ?> 155 <li class="delete"> 121 <?php // Tom: Just a quick note about this -- Enabling the delete button for singleton slot works, it just clears out the value for that slot instead of deleting the slot. ?> 122 <li> 156 123 <?php $delete_button_style = sfConfig::get('app_a_delete_button_style', "no-label"); ?> 157 124 <?php echo jq_link_to_remote(__('Delete', null, 'apostrophe'), array( … … 172 139 173 140 <?php endif ?> 174 <?php // End controls for this individual slot?>141 <?php // End Slot Controls ?> 175 142 176 143 <?php // Wraps the actual content - edit and normal views for this individual slot ?> … … 179 146 <?php include_slot("a-slot-content-$pageid-$name-$permid") ?> 180 147 </div> 181 </div> 148 </div><!-- END SLOT --> 149 182 150 <?php $i++; endforeach ?> 183 151 … … 186 154 </div> <?php // Closes the div wrapping all of the slots AND the area controls ?> 187 155 <?php endif ?> 188 <!-- END SLOT -->189 190 156 191 157 -
plugins/apostrophePlugin/branches/features/css/modules/a/templates/_globalTools.php
r1703 r1859 7 7 8 8 <div id="a-global-toolbar"> 9 <?php // All logged in users, including guests with no admin abilities, need access to the ?>10 <?php // logout button. But if you have no legitimate admin roles, you shouldn't see the ?>11 <?php // apostrophe or the global buttons ?>12 9 13 <?php $buttons = aTools::getGlobalButtons() ?> 14 <?php $page = aTools::getCurrentPage() ?> 15 <?php $pageEdit = $page && $page->userHasPrivilege('edit') ?> 16 <?php $cmsAdmin = $sf_user->hasCredential('cms_admin') ?> 10 <ul class="a-ui a-controls"> 17 11 18 <?php if ($cmsAdmin || count($buttons) || $pageEdit): ?>12 <?php if ($cmsAdmin || count($buttons) || $pageEdit): ?> 19 13 20 <?php // The Apostrophe ?> 21 <div class="a-global-toolbar-apostrophe"> 22 <?php echo link_to(__('Apostrophe Now', null, 'apostrophe'),'@homepage', array('id' => 'the-apostrophe')) ?> 23 <ul class="a-global-toolbar-buttons a-controls"> 14 <li><?php echo link_to(__('Apostrophe Now', null, 'apostrophe'),'@homepage', array('id' => 'the-apostrophe')) ?></li> 24 15 25 <?php foreach ($buttons as $button): ?> 26 <?php if ($button->getTargetEnginePage()): ?> 27 <?php aRouteTools::pushTargetEnginePage($button->getTargetEnginePage()) ?> 28 <?php endif ?> 29 <li><?php echo link_to(__($button->getLabel(), null, 'apostrophe'), $button->getLink(), array('class' => 'a-btn icon ' . $button->getCssClass())) ?></li> 30 <?php endforeach ?> 16 <?php foreach ($buttons as $button): ?> 17 <?php if ($button->getTargetEnginePage()): ?><?php aRouteTools::pushTargetEnginePage($button->getTargetEnginePage()) ?><?php endif ?> 18 <li><?php echo link_to(__($button->getLabel(), null, 'apostrophe'), $button->getLink(), array('class' => 'a-btn icon ' . $button->getCssClass())) ?></li> 19 <?php endforeach ?> 31 20 32 <?php if ($page && (!$page->admin) && $cmsAdmin && $pageEdit): ?>33 <li>34 <a href="#" onclick="return false;" class="a-btn icon a-page-settings" id="a-page-settings-button">Page Settings</a>35 <div id="a-page-settings" class="a-page-settings-menu dropshadow"></div>36 </li>21 <?php if ($page && (!$page->admin) && $cmsAdmin && $pageEdit): ?> 22 <li> 23 <a href="#" onclick="return false;" class="a-btn icon a-page-settings" id="a-page-settings-button">Page Settings</a> 24 <div id="a-page-settings" class="a-page-settings-menu dropshadow"></div> 25 </li> 37 26 38 <?php // Remove the Add Page Button if we have reached our max depth, max peers, or if it is an engine page ?>39 <?php $maxPageLevels = (sfConfig::get('app_a_max_page_levels'))? sfConfig::get('app_a_max_page_levels') : 0; ?><?php // Your Site Tree can only get so deep ?>40 <?php $maxChildPages = (sfConfig::get('app_a_max_children_per_page'))? sfConfig::get('app_a_max_children_per_page') : 0; ?><?php // Your Site Tree can only get so wide ?>41 <?php if (!(($maxPageLevels && ($page->getLevel() == $maxPageLevels)) || ($maxChildPages && (count($page->getChildren()) == $maxChildPages)) || strlen($page->getEngine()))): ?>42 <li><?php include_component('a', 'createPage', array('page' => $page, 'edit' => $page->userHasPrivilege('edit'))); ?></li>43 <?php endif ?>27 <?php // Remove the Add Page Button if we have reached our max depth, max peers, or if it is an engine page ?> 28 <?php $maxPageLevels = (sfConfig::get('app_a_max_page_levels'))? sfConfig::get('app_a_max_page_levels') : 0; ?><?php // Your Site Tree can only get so deep ?> 29 <?php $maxChildPages = (sfConfig::get('app_a_max_children_per_page'))? sfConfig::get('app_a_max_children_per_page') : 0; ?><?php // Your Site Tree can only get so wide ?> 30 <?php if (!(($maxPageLevels && ($page->getLevel() == $maxPageLevels)) || ($maxChildPages && (count($page->getChildren()) == $maxChildPages)) || strlen($page->getEngine()))): ?> 31 <li><?php include_component('a', 'createPage', array('page' => $page, 'edit' => $page->userHasPrivilege('edit'))); ?></li> 32 <?php endif ?> 44 33 45 <?php endif ?> 46 </ul> 47 </div> 34 <?php endif ?> 35 <?php endif ?> 48 36 49 <?php endif ?> 37 <li class="a-login"> 38 <?php include_partial("a/login") ?> 39 </li> 50 40 51 <?php // Login / Logout ?> 52 <div class="a-global-toolbar-login a-login"> 53 <?php include_partial("a/login") ?> 54 </div> 41 </ul> 55 42 56 43 </div> … … 81 68 }); 82 69 }); 83 84 70 }); 85 71 </script> -
plugins/apostrophePlugin/branches/features/css/web/css/a-area-slots.css
r1849 r1859 358 358 -------------------------------------*/ 359 359 360 ul.a-controls360 .a-ui.a-controls 361 361 { 362 362 position: relative; … … 366 366 } 367 367 368 ul.a-controls li368 .a-ui.a-controls li 369 369 { /* All controls buttons are wrapped in a list. */ 370 370 float: left; … … 378 378 } 379 379 380 ul.a-controls li.last380 .a-ui.a-controls li.last 381 381 { /* .last option has no margin */ 382 382 margin: 0 0 2px 0 !important; 383 383 } 384 384 385 .a-area > ul.a-controls385 .a-area > .a-ui.a-controls 386 386 { 387 387 margin: 0 0 10px; … … 389 389 } 390 390 391 .a-area.singleton > ul.a-controls391 .a-area.singleton > .a-ui.a-controls 392 392 { 393 393 position: absolute; … … 398 398 } 399 399 400 .a-area.singleton.aRichText > ul.a-controls,401 .a-area.singleton.aText > ul.a-controls,402 .a-area.singleton.aBlog > ul.a-controls,403 .a-area.singleton.aBlogSingle > ul.a-controls,404 .a-area.singleton.aEvent > ul.a-controls,405 .a-area.singleton.aEventSingle > ul.a-controls400 .a-area.singleton.aRichText > .a-ui.a-controls, 401 .a-area.singleton.aText > .a-ui.a-controls, 402 .a-area.singleton.aBlog > .a-ui.a-controls, 403 .a-area.singleton.aBlogSingle > .a-ui.a-controls, 404 .a-area.singleton.aEvent > .a-ui.a-controls, 405 .a-area.singleton.aEventSingle > .a-ui.a-controls 406 406 { /* Some Singleton Slots don't want Area Controls to sit on top of their content */ 407 407 position: relative; … … 444 444 /* Options Element -- This creates a box for menu options and for slot options */ 445 445 446 .a- options446 .a-ui .a-options 447 447 { 448 448 padding: 35px 5px 2px 5px;

