Changeset 25305
- Timestamp:
- 03/17/10 20:46:33 (6 months ago)
- Files:
-
- branches/ragnaroek/midcom/midcom.core/midcom/helper/_styleloader.php (modified) (1 diff)
- branches/ragnaroek/midcom/midcom.core/midcom/services/toolbars.php (modified) (2 diffs)
- branches/ragnaroek/midcom/midgard.admin.asgard/handler/object/manage.php (modified) (1 diff)
- branches/ragnaroek/midcom/midgard.admin.asgard/locale/default.en.txt (modified) (4 diffs)
- branches/ragnaroek/midcom/midgard.admin.asgard/objecthelper.php (added)
- branches/ragnaroek/midcom/midgard.admin.asgard/static/screen.css (modified) (2 diffs)
- branches/ragnaroek/midcom/midgard.admin.asgard/style/midgard_admin_asgard_object_create.php (modified) (1 diff)
- branches/ragnaroek/midcom/midgard.admin.asgard/style/midgard_admin_asgard_object_edit.php (modified) (1 diff)
- branches/ragnaroek/midcom/midgard.admin.asgard/style/midgard_admin_asgard_object_view.php (modified) (1 diff)
- branches/ragnaroek/midcom/midgard.admin.asgard/style/midgard_admin_asgard_objecthelper_style_element.php (added)
- branches/ragnaroek/midcom/midgard.admin.asgard/style/midgard_admin_asgard_objecthelper_style_elementnames.php (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/ragnaroek/midcom/midcom.core/midcom/helper/_styleloader.php
r24773 r25305 522 522 $results['elements']['midcom'][$mc->get_subkey($guid, 'name')] = ''; 523 523 } 524 525 if (!isset($results['elements']['midcom']['ROOT'])) 526 { 527 // There should always be the ROOT element available 528 $results['elements']['midcom']['ROOT'] = ''; 529 } 524 530 } 525 531 branches/ragnaroek/midcom/midcom.core/midcom/services/toolbars.php
r25299 r25305 513 513 } 514 514 515 if ( $_MIDCOM->componentloader->is_installed('midcom.admin.styleeditor') 516 && $topic->can_do('midcom.admin.folder:template_management') 517 && $_MIDCOM->auth->can_user_do('midcom.admin.styleeditor:access', null, 'midcom_admin_styleeditor_viewer')) 518 { 515 if ( $topic->can_do('midcom.admin.folder:template_management') 516 && $_MIDCOM->auth->can_user_do('midgard.admin.asgard:manage_objects', null, 'midgard_admin_asgard_plugin')) 517 { 518 $enabled = false; 519 $styleeditor_url = ''; 519 520 if ($topic->style != '') 520 521 { 521 $enabled = true; 522 523 $style_id = $_MIDCOM->style->get_style_id_from_path($topic->style); 524 if ($style_id) 525 { 526 $style = midcom_db_style::get_cached($style_id); 527 if ( $style 528 && $style->guid) 529 { 530 $styleeditor_url = "{$_MIDGARD['self']}__mfa/asgard/object/view/{$style->guid}/"; 531 $enabled = true; 532 } 533 } 522 534 } 523 else524 {525 $enabled = false;526 }527 535 528 536 $toolbar->add_item … … 530 538 array 531 539 ( 532 MIDCOM_TOOLBAR_URL => "__mfa/asgard_midcom.admin.styleeditor/",533 MIDCOM_TOOLBAR_LABEL => $_MIDCOM->i18n->get_string('edit layout template', 'mid com.admin.styleeditor'),540 MIDCOM_TOOLBAR_URL => $styleeditor_url, 541 MIDCOM_TOOLBAR_LABEL => $_MIDCOM->i18n->get_string('edit layout template', 'midgard.admin.asgard'), 534 542 MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/text-x-generic-template.png', 535 543 MIDCOM_TOOLBAR_ACCESSKEY => 't', branches/ragnaroek/midcom/midgard.admin.asgard/handler/object/manage.php
r25057 r25305 123 123 $this->_l10n =& $this->_request_data['l10n']; 124 124 midgard_admin_asgard_plugin::get_default_mode($this->_request_data); 125 126 // Accordion is needed for per-type help when available 127 $_MIDCOM->add_jsfile(MIDCOM_JQUERY_UI_URL . '/ui/ui.core.js'); 128 $_MIDCOM->add_jsfile(MIDCOM_JQUERY_UI_URL . '/ui/minified/ui.accordion.min.js'); 125 129 } 126 130 branches/ragnaroek/midcom/midgard.admin.asgard/locale/default.en.txt
r25280 r25305 212 212 ---STRINGEND 213 213 214 ---STRING copy default value 215 Copy from the default 216 ---STRINGEND 217 214 218 ---STRING copy metadata 215 219 Copy metadata … … 252 256 ---STRINGEND 253 257 258 ---STRING creating new style element 259 Elements you can use in this Style 260 ---STRINGEND 261 254 262 ---STRING date 255 263 Date … … 308 316 ---STRINGEND 309 317 318 ---STRING edit layout template 319 Edit layout template 320 ---STRINGEND 321 310 322 ---STRING edit text file 311 323 Edit text file … … 316 328 ---STRINGEND 317 329 330 ---STRING element %s from component %s 331 Element "%s" used in %s 332 ---STRINGEND 333 334 ---STRING element defaults 335 Default contents of the element 336 ---STRINGEND 337 318 338 ---STRING enable breaking of the editing lock 319 339 Enable breaking of the editing lock branches/ragnaroek/midcom/midgard.admin.asgard/static/screen.css
r24593 r25305 54 54 -moz-border-radius: 6px; 55 55 -webkit-border-radius: 6px; 56 border-radius: 6px; 56 57 padding-top: 16px; 57 58 overflow: auto; … … 890 891 display: none; 891 892 } 893 894 /* Object editing help */ 895 #content div.midgard_admin_asgard_objecthelper_help 896 { 897 background-color: #888a85; 898 background-color: #d3d7cf; 899 -moz-border-radius: 6px; 900 -webkit-border-radius: 6px; 901 border-radius: 6px; 902 padding: 12px; 903 margin-bottom: 12px; 904 } 905 #content div.midgard_admin_asgard_objecthelper_help h3 906 { 907 margin: 0px; 908 padding: 0px; 909 } 910 #content div.midgard_admin_asgard_objecthelper_help h3 a 911 { 912 color: #000000; 913 } 914 #content div.ui-accordion h3 a 915 { 916 background-image: url('../stock-icons/16x16/list-add.png'); 917 background-position: left; 918 background-repeat: no-repeat; 919 padding-left: 20px; 920 } 921 #content div.ui-accordion h3.selected a 922 { 923 background-image: url('../stock-icons/16x16/list-remove.png'); 924 } 925 #content div.midgard_admin_asgard_objecthelper_help > div 926 { 927 margin-top: 6px; 928 background-color: #babdb6; 929 -moz-border-radius: 6px; 930 -webkit-border-radius: 6px; 931 border-radius: 6px; 932 padding: 6px; 933 } 934 935 #content div.midgard_admin_asgard_objecthelper_help div ul li.component 936 { 937 font-weight: bold; 938 margin-bottom: 1em; 939 } 940 #content div.midgard_admin_asgard_objecthelper_help div ul li.component:last-child 941 { 942 margin-bottom: 0px; 943 } 944 945 #content div.midgard_admin_asgard_objecthelper_help div ul, 946 #content div.midgard_admin_asgard_objecthelper_help div ul li.component ul 947 { 948 list-style: none; 949 margin-left: 0px; 950 padding-left: 0px; 951 margin-top: 0px; 952 margin-bottom: 0px; 953 } 954 #content div.midgard_admin_asgard_objecthelper_help div ul li.component ul li 955 { 956 display: inline; 957 font-weight: normal; 958 margin-left: 0px; 959 padding-left: 0px; 960 margin-right: 1em; 961 } 962 #content div.midgard_admin_asgard_objecthelper_help div ul li.component ul li a 963 { 964 color: #000000; 965 } 966 967 #content div.midgard_admin_asgard_objecthelper_help label 968 { 969 font-weight: bold; 970 display: block; 971 } 972 #content div.midgard_admin_asgard_objecthelper_help textarea 973 { 974 width: 90%; 975 height: 16em; 976 border: none; 977 background-color: #d3d7cf; 978 color: #555753; 979 } 980 #content div.midgard_admin_asgard_objecthelper_help button.copy 981 { 982 background-image: url('../stock-icons/16x16/editcopy.png'); 983 background-position: left; 984 background-repeat: no-repeat; 985 padding-left: 20px; 986 } branches/ragnaroek/midcom/midgard.admin.asgard/style/midgard_admin_asgard_object_create.php
r23023 r25305 1 <?php 2 midgard_admin_asgard_objecthelper::get_help($data); 3 ?> 1 4 <div class="object_edit"> 2 5 <?php $data['controller']->display_form(); ?> branches/ragnaroek/midcom/midgard.admin.asgard/style/midgard_admin_asgard_object_edit.php
r23023 r25305 1 <?php 2 midgard_admin_asgard_objecthelper::get_help($data); 3 ?> 1 4 <script type="text/javascript"> 2 5 jQuery(document).ready(function() { branches/ragnaroek/midcom/midgard.admin.asgard/style/midgard_admin_asgard_object_view.php
r23023 r25305 1 <?php 2 midgard_admin_asgard_objecthelper::get_help($data); 3 ?> 1 4 <div class="object_view"> 2 5 <?php $data['datamanager']->display_view(); ?>
