Changeset 2171
- Timestamp:
- 09/09/10 17:11:12 (17 months ago)
- Location:
- plugins/apostrophePlugin/trunk
- Files:
-
- 8 modified
-
modules/a/templates/_allPrivileges.php (modified) (1 diff)
-
modules/a/templates/layout.php (modified) (1 diff)
-
modules/a/templates/settingsSuccess.php (modified) (5 diffs)
-
web/css/a-components.css (modified) (4 diffs)
-
web/css/a-forms.css (modified) (1 diff)
-
web/css/a-utility.css (modified) (1 diff)
-
web/js/a.js (modified) (2 diffs)
-
web/js/aUI.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
plugins/apostrophePlugin/trunk/modules/a/templates/_allPrivileges.php
r2135 r2171 9 9 <h3><?php echo a_('Page Permissions') ?></h3> 10 10 11 <div class="a-page-permissions content"> 12 <p class="a-form-help-text"><?php echo a_('Select Groups and Individuals to edit this page and itâs children') ?></p> 13 <div class="a-page-permissions-section a-page-permissions-by-group"> 14 <?php include_partial('a/privileges', 15 array('form' => $form, 'widget' => 'group_editors', 16 'label' => 'Editor Groups', 'inherited' => $inherited['group_edit'], 17 'admin' => $admin['group_edit'])) ?> 18 <?php include_partial('a/privileges', 19 array('form' => $form, 'widget' => 'group_managers', 20 'label' => 'Manager Groups', 'inherited' => $inherited['group_manage'], 21 'admin' => $admin['group_manage'])) ?> 22 </div> 23 <div class="a-page-permissions-section a-page-permissions-by-user"> 24 <?php include_partial('a/privileges', 25 array('form' => $form, 'widget' => 'editors', 26 'label' => 'Individual Editors', 'inherited' => $inherited['edit'], 27 'admin' => $admin['edit'])) ?> 28 <?php include_partial('a/privileges', 29 array('form' => $form, 'widget' => 'managers', 30 'label' => 'Individual Managers', 'inherited' => $inherited['manage'], 31 'admin' => $admin['manage'])) ?> 11 <div class="a-accordion-content"> 12 <div class="a-form-row a-page-permissions"> 13 <p class="a-form-help-text"><?php echo a_('Select Groups and Individuals to edit this page and itâs children') ?></p> 14 <div class="a-page-permissions-section a-page-permissions-by-group"> 15 <?php include_partial('a/privileges', 16 array('form' => $form, 'widget' => 'group_editors', 17 'label' => 'Editor Groups', 'inherited' => $inherited['group_edit'], 18 'admin' => $admin['group_edit'])) ?> 19 <?php include_partial('a/privileges', 20 array('form' => $form, 'widget' => 'group_managers', 21 'label' => 'Manager Groups', 'inherited' => $inherited['group_manage'], 22 'admin' => $admin['group_manage'])) ?> 23 </div> 24 <div class="a-page-permissions-section a-page-permissions-by-user"> 25 <?php include_partial('a/privileges', 26 array('form' => $form, 'widget' => 'editors', 27 'label' => 'Individual Editors', 'inherited' => $inherited['edit'], 28 'admin' => $admin['edit'])) ?> 29 <?php include_partial('a/privileges', 30 array('form' => $form, 'widget' => 'managers', 31 'label' => 'Individual Managers', 'inherited' => $inherited['manage'], 32 'admin' => $admin['manage'])) ?> 33 </div> 32 34 </div> 33 35 </div> -
plugins/apostrophePlugin/trunk/modules/a/templates/layout.php
r2160 r2171 16 16 <?php a_include_javascripts() ?> 17 17 <link rel="shortcut icon" href="/favicon.ico" /> 18 18 19 19 <!--[if lt IE 7]> 20 <script type="text/javascript" charset="utf-8">21 $(document).ready(function() {22 aIE6(<?php echo ($sf_user->isAuthenticated())? 'true':'false' ?>, <?php echo json_encode(__('You are using IE6! That is just awful! Apostrophe does not support editing using Internet Explorer 6. Why don\'t you try upgrading? <a href="http://www.getfirefox.com">Firefox</a> <a href="http://www.google.com/chrome">Chrome</a> <a href="http://www.apple.com/safari/download/">Safari</a> <a href="http://www.microsoft.com/windows/internet-explorer/worldwide-sites.aspx">IE8</a>', null, 'apostrophe')) ?>);23 });24 </script>20 <script type="text/javascript" charset="utf-8"> 21 $(document).ready(function() { 22 apostrophe.IE6({'authenticated':<?php echo ($sf_user->isAuthenticated())? 'true':'false' ?>, 'message':<?php echo json_encode(__('You are using IE6! That is just awful! Apostrophe does not support editing using Internet Explorer 6. Why don\'t you try upgrading? <a href="http://www.getfirefox.com">Firefox</a> <a href="http://www.google.com/chrome">Chrome</a> <a href="http://www.apple.com/safari/download/">Safari</a> <a href="http://www.microsoft.com/windows/internet-explorer/worldwide-sites.aspx">IE8</a>', null, 'apostrophe')) ?>}); 23 }); 24 </script> 25 25 <![endif]--> 26 26 -
plugins/apostrophePlugin/trunk/modules/a/templates/settingsSuccess.php
r2160 r2171 29 29 <?php echo $form->renderGlobalErrors() ?> 30 30 31 <div class="a-options-section ">31 <div class="a-options-section open"> 32 32 <h3>Title & Permalink</h3> 33 33 <div class="a-form-row a-page-title"> … … 44 44 <?php if (isset($form['slug'])): ?> 45 45 <div class="a-form-row a-page-slug"> 46 <h4><?php echo $form['slug']->renderLabel( __('Permalink', array(), 'apostrophe')) ?></h4>46 <h4><?php echo $form['slug']->renderLabel('http://'.$_SERVER['HTTP_HOST']) ?></h4> 47 47 <div class="a-form-field"> 48 48 <?php echo $form['slug'] ?> … … 50 50 <?php echo $form['slug']->renderError() ?> 51 51 </div> 52 <?php elseif (0): ?>53 <?php // If It's the ho ?>54 52 <?php endif ?> 55 53 … … 58 56 <hr/> 59 57 60 <div class="a-options-section ">58 <div class="a-options-section a-accordion"> 61 59 62 60 <h3>Options</h3> 63 61 64 <div class="a-form-row engine a-page-type"> 65 <h4><?php echo $form['engine']->renderLabel(__('Page Type', array(), 'apostrophe')) ?></h4> 66 <div class="a-form-field"> 67 <?php echo $form['engine']->render(array('onChange' => 'aUpdateEngineAndTemplate()')) ?> 62 <div class="a-accordion-content"> 63 64 <div class="a-form-row engine a-page-type"> 65 <h4><?php echo $form['engine']->renderLabel(__('Page Type', array(), 'apostrophe')) ?></h4> 66 <div class="a-form-field"> 67 <?php echo $form['engine']->render(array('onChange' => 'aUpdateEngineAndTemplate()')) ?> 68 </div> 69 <?php echo $form['engine']->renderError() ?> 68 70 </div> 69 <?php echo $form['engine']->renderError() ?> 71 72 <div class="a-form-row a-edit-page-template"> 73 <h4><?php echo $form['template']->renderLabel(__('Page Template', array(), 'apostrophe')) ?></h4> 74 <div class="a-form-field"> 75 <?php echo $form['template'] ?> 76 </div> 77 <?php echo $form['template']->renderError() ?> 78 </div> 79 80 <?php if (isset($engineSettingsPartial)): ?> 81 <div class="a-form-row a-engine-page-settings" id="a_settings_engine_settings"> 82 <?php include_partial($engineSettingsPartial, array('form' => $engineForm)) ?> 83 </div> 84 <?php endif ?> 85 86 <div class="a-form-row status"> 87 <h4><label><?php echo __('Page Status', null, 'apostrophe') ?></label></h4> 88 <div class="a-page-settings-status"> 89 <?php echo $form['archived'] ?> 90 <?php if(isset($form['cascade_archived'])): ?> 91 <?php echo $form['cascade_archived'] ?> <?php echo __('Cascade status changes to children', null, 'apostrophe') ?> 92 <?php endif ?> 93 </div> 94 </div> 95 96 <div class="a-form-row privacy"> 97 <h4><label><?php echo __('Page Privacy', null, 'apostrophe') ?></label></h4> 98 <div class="a-page-settings-status"> 99 <?php echo $form['view_is_secure'] ?> 100 <?php if(isset($form['cascade_view_is_secure'])): ?> 101 <?php echo $form['cascade_view_is_secure'] ?> <?php echo __('Cascade privacy changes to children', null, 'apostrophe') ?> 102 <?php endif ?> 103 </div> 104 </div> 105 70 106 </div> 71 72 <div class="a-form-row a-edit-page-template">73 <h4><?php echo $form['template']->renderLabel(__('Page Template', array(), 'apostrophe')) ?></h4>74 <div class="a-form-field">75 <?php echo $form['template'] ?>76 </div>77 <?php echo $form['template']->renderError() ?>78 </div>79 80 <?php if (isset($engineSettingsPartial)): ?>81 <div id="a_settings_engine_settings">82 <?php include_partial($engineSettingsPartial, array('form' => $engineForm)) ?>83 </div>84 <?php endif ?>85 86 <div class="a-form-row status">87 <h4><label><?php echo __('Page Status', null, 'apostrophe') ?></label></h4>88 <div class="a-page-settings-status">89 <?php echo $form['archived'] ?>90 <?php if(isset($form['cascade_archived'])): ?>91 <?php // If you want your <em> back here, do it in the translation file ?>92 <?php echo $form['cascade_archived'] ?> <?php echo __('Cascade status changes to children', null, 'apostrophe') ?>93 <?php endif ?>94 </div>95 </div>96 97 <div class="a-form-row privacy">98 <h4><label><?php echo __('Page Privacy', null, 'apostrophe') ?></label></h4>99 <div class="a-page-settings-status">100 <?php echo $form['view_is_secure'] ?>101 <?php if(isset($form['cascade_view_is_secure'])): ?>102 <?php echo $form['cascade_view_is_secure'] ?> <?php echo __('Cascade privacy changes to children', null, 'apostrophe') ?>103 <?php endif ?>104 </div>105 </div>106 107 107 </div> 108 108 109 109 <hr/> 110 110 111 <div class="a-options-section ">111 <div class="a-options-section a-accordion"> 112 112 113 113 <h3>Tags & Metadata</h3> 114 114 115 <div class="a-form-row keywords"> 116 <div class="a-form-field"> 117 <?php echo $form['tags'] ?> 115 <div class="a-accordion-content"> 116 117 <div class="a-form-row keywords"> 118 <div class="a-form-field"> 119 <?php echo $form['tags'] ?> 120 </div> 121 <?php echo $form['tags']->renderError() ?> 122 <?php a_js_call('aInlineTaggableWidget(?, ?)', '.tags-input', array('popular-tags' => $popularTags, 'existing-tags' => $existingTags, 'typeahead-url' => url_for('taggableComplete/complete'), 'tagsLabel' => 'Page Tags')) ?> 118 123 </div> 119 <?php echo $form['tags']->renderError() ?> 120 <?php a_js_call('aInlineTaggableWidget(?, ?)', '.tags-input', array('popular-tags' => $popularTags, 'existing-tags' => $existingTags, 'typeahead-url' => url_for('taggableComplete/complete'), 'tagsLabel' => 'Page Tags')) ?> 124 125 <div class="a-form-row meta-description"> 126 <h4 class="a-block"><?php echo $form['meta_description']->renderLabel(__('Meta Description', array(), 'apostrophe')) ?></h4> 127 <div class="a-form-field"> 128 <?php echo $form['meta_description'] ?> 129 </div> 130 <?php echo $form['meta_description']->renderError() ?> 131 </div> 132 121 133 </div> 122 123 <div class="a-form-row meta-description">124 <h4 class="a-block"><?php echo $form['meta_description']->renderLabel(__('Meta Description', array(), 'apostrophe')) ?></h4>125 <div class="a-form-field">126 <?php echo $form['meta_description'] ?>127 </div>128 <?php echo $form['meta_description']->renderError() ?>129 </div>130 131 134 </div> 132 135 133 136 <hr/> 134 137 135 <div class="a-options-section ">138 <div class="a-options-section a-accordion"> 136 139 <?php include_partial('a/allPrivileges', array('form' => $form, 'inherited' => $inherited, 'admin' => $admin)) ?> 137 140 </div> … … 153 156 </form> 154 157 <?php a_js_call('apostrophe.updateEngineAndTemplate(?)', array('url' => url_for('a/engineSettings'), 'id' => $page->id)) ?> 158 <?php a_js_call('apostrophe.accordion(?)', array('accordion_toggle' => '.a-options-section:not(".open") h3')) ?> 159 155 160 <?php // All AJAX actions that use a_js_call must do this since they have no layout to do it for them ?> 156 157 161 <script src="/sfJqueryReloadedPlugin/js/plugins/jquery.autocomplete.js"></script> 158 162 <script src="/sfDoctrineActAsTaggablePlugin/js/pkTagahead.js"></script> -
plugins/apostrophePlugin/trunk/web/css/a-components.css
r2169 r2171 351 351 overflow: hidden; 352 352 padding: 5px; 353 margin: 5px 0;353 margin: 8px 0; 354 354 width: auto; 355 355 -moz-border-radius: 2px; … … 404 404 .a-ui.a-page-form .a-page-settings-section .content { margin: 0 16px; float: left; } 405 405 406 .a-ui.a-page-form .a-page-settings-section h4 407 { 408 background: url(/apostrophePlugin/images/a-icon-arrow-toggle.png) -6px -40px no-repeat; 409 cursor: pointer; 410 text-indent: 16px; 411 line-height: 20px; 412 width: 100%; 413 position: relative; 414 margin: 0 0 5px 0; 415 } 416 417 .a-ui.a-page-form .a-page-settings-section h4:hover { background-position: -6px 0; } 418 .a-ui.a-page-form .a-page-settings-section.open h4 { background-position: -6px -20px; } 419 .a-ui.a-page-form .a-page-settings-section.open h4:hover { background-position: -6px -60px; } 406 .a-ui.a-page-form h4 { margin: 5px 0; } 420 407 421 408 .a-ui .a-page-settings-status { float: left; width: 230px; } … … 440 427 .a-page-settings-section.page-submit a.a-btn.a-cancel { float: left !important; clear: none !important; margin-left: 2px; } 441 428 .a-page-settings-section.page-submit a.a-btn.a-delete { float: right !important; clear: none; } 429 430 .a-ui.a-page-form .a-accordion-toggle 431 { 432 background: url(/apostrophePlugin/images/a-icon-arrow-toggle.png) -6px -40px no-repeat; 433 cursor: pointer; 434 clear: both; 435 text-indent: 16px; 436 line-height: 20px; 437 -webkit-user-select:none; 438 -moz-user-select:none; 439 } 440 441 .a-ui.a-page-form .a-accordion-toggle.hover, 442 .a-ui.a-page-form .a-accordion-toggle:hover { background-position: -6px 0px; } 443 444 .a-ui.a-page-form .open .a-accordion-toggle { background-position: -6px -20px; } 445 446 .a-ui.a-page-form .open .a-accordion-toggle.hover, 447 .a-ui.a-page-form .open .a-accordion-toggle:hover { background-position: -6px -60px; } 448 442 449 443 450 /* Create Page Form … … 1042 1049 } 1043 1050 1044 .a-inline-taggable-widget-tag-container.a-popular .a-tag 1045 { 1051 .a-inline-taggable-widget-tag-container.a-popular-tags .a-tag 1052 { 1053 display: block; 1046 1054 clear: both; 1047 1055 } -
plugins/apostrophePlugin/trunk/web/css/a-forms.css
r2169 r2171 17 17 text-align: left; 18 18 font-weight: normal; 19 text-transform: capitalize;20 19 width: 120px; 21 20 line-height: 20px; -
plugins/apostrophePlugin/trunk/web/css/a-utility.css
r2135 r2171 33 33 .a-disabled, .a-disabled * { cursor: default !important; opacity: 0.65; } 34 34 35 /* Accordion works with aAccordion() in aUI.js */ 36 .a-accordion .content { display: none; } 37 .a-accordion.open .content { display: block; } 35 /* Accordion works with apostrophe.accordion() */ 36 .a-accordion .a-accordion-content { display: none; } 37 .a-accordion.open .a-accordion-content { display: block; } 38 39 .a-accordion-toggle.hover, 40 .a-accordion-toggle:hover 41 { 42 cursor: pointer; 43 color: #000; 44 } -
plugins/apostrophePlugin/trunk/web/js/a.js
r2167 r2171 286 286 } 287 287 288 aAccordion('.a-page-settings-section-head'); 288 // apostrophe.accordion({"accordion_toggle":".a-page-settings-section-head"}); 289 289 290 aRadioSelect('.a-radio-select', { }); 290 291 $('#a-page-settings').show(); … … 714 715 } 715 716 717 this.IE6 = function(options) 718 { 719 var authenticated = options['authenticated']; 720 var message = options['message']; 721 // This is called within a conditional comment for IE6 in Apostrophe's layout.php 722 if (authenticated) 723 { 724 $(document.body).addClass('ie6').prepend('<div id="ie6-warning"><h2>' + message + '</h2></div>'); 725 } 726 } 727 728 this.accordion = function(options) 729 { 730 var toggle = options['accordion_toggle']; 731 732 if (typeof toggle == "undefined") { 733 apostrophe.log('[Apostrophe] Accordion Toggle is undefined.'); 734 } 735 else 736 { 737 if (typeof toggle == "string") { toggle = $(toggle); } 738 739 var container = toggle.parent(); 740 var content = toggle.next(); 741 742 container.addClass('a-accordion'); 743 content.addClass('a-accordion-content'); 744 745 toggle.each(function() { 746 var t = $(this); 747 t.click(function(event){ 748 event.preventDefault(); 749 t.closest('.a-accordion').toggleClass('open'); 750 }) 751 .hover(function(){ 752 t.addClass('hover'); 753 },function(){ 754 t.removeClass('hover'); 755 }); 756 }).addClass('a-accordion-toggle'); 757 }; 758 759 /* Example Mark-up 760 <script> 761 apostrophe.accordion({'accordion_toggle': '.a-accordion-item h3' }); 762 </script> 763 764 BEFORE: 765 <div> 766 <h3>Heading</h3> 767 <div>Content</div> 768 </div> 769 770 AFTER: 771 <div class="a-accordion"> 772 <h3 class="a-accordion-toggle">Heading</h3> 773 <div class="a-accordion-content">Content</div> 774 </div> 775 */ 776 } 777 716 778 } 717 779 -
plugins/apostrophePlugin/trunk/web/js/aUI.js
r2160 r2171 73 73 } 74 74 75 function aIE6(authenticated, message)76 {77 // This is called within a conditional comment for IE6 in Apostrophe's layout.php78 if (authenticated)79 {80 $(document.body).addClass('ie6').prepend('<div id="ie6-warning"><h2>' + message + '</h2></div>');81 }82 83 // Misc IE6 enhancements we want to happen84 $('input[type="checkbox"]').addClass('checkbox');85 $('input[type="radio"]').addClass('checkbox');86 }87 88 function aAccordion(heading)89 {90 if (typeof heading == "string") { heading = $(heading); }91 heading.click(function() {92 $(this).parent().toggleClass('open');93 return false;94 }).parent().addClass('a-accordion');95 /* Example Mark-up96 <div class="a-accordion-item">97 <h3>Heading</h3> header = $('.a-accordion-item h3)98 <div>Content</div>99 </div>100 */101 }102 103 75 $(document).ready(function(){ 104 76 aUI();

