Changeset 796
- Timestamp:
- 16.11.2009 16:10:24 (2 years ago)
- Location:
- ZMS/trunk
- Files:
-
- 1 added
- 9 edited
-
ZMSMetaobjManager.py (modified) (4 diffs)
-
_confmanager.py (modified) (7 diffs)
-
changes.txt (modified) (1 diff)
-
dtml/ZMSContainerObject/manage_main.dtml (modified) (1 diff)
-
dtml/ZMSItem (added)
-
dtml/ZMSObject/input_fields.dtml (modified) (4 diffs)
-
dtml/ZMSObject/manage_main.dtml (modified) (1 diff)
-
import/zms.metaobj.xml (modified) (12 diffs)
-
version.txt (modified) (1 diff)
-
zmstrashcan.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ZMS/trunk/ZMSMetaobjManager.py
r794 r796 105 105 # Globals. 106 106 # -------- 107 valid_types = ['amount','autocomplete','boolean','color','date','datetime','dialog','dictionary','file','float','identifier','image','int','list','multiautocomplete','multiselect','password','richtext','select','string','text','time','url','xml'] 108 valid_xtypes = ['constant','delimiter','hint','interface','method','resource'] 109 valid_datatypes = ['amount','autocomplete','boolean','color','constant','date','datetime','delimiter','dialog','dictionary','file','float','hint','identifier','image','int','interface','list','method','multiautocomplete','multiselect','password','resource','richtext','select','string','text','time','url','xml'] 110 valid_objtypes = [ 'ZMSDocument', 'ZMSObject', 'ZMSTeaserElement', 'ZMSRecordSet', 'ZMSResource', 'ZMSReference', 'ZMSLibrary', 'ZMSPackage', 'ZMSModule'] 107 valid_types = ['amount','autocomplete','boolean','color','date','datetime','dialog','dictionary','file','float','identifier','image','int','list','multiautocomplete','multiselect','password','richtext','select','string','text','time','url','xml'] 108 valid_xtypes = ['constant','delimiter','hint','interface','method','resource'] 109 valid_datatypes = valid_types+valid_xtypes 110 valid_datatypes.sort() 111 valid_objtypes = [ 'ZMSDocument', 'ZMSObject', 'ZMSTeaserElement', 'ZMSRecordSet', 'ZMSResource', 'ZMSReference', 'ZMSLibrary', 'ZMSPackage', 'ZMSModule'] 111 112 valid_zopetypes = [ 'DTML Method', 'DTML Document', 'External Method', 'Page Template', 'Script (Python)', 'Z SQL Method'] 112 113 … … 299 300 if action: 300 301 l.append({'action':action,'filepath':filepath,'mrevision':mrevision,'filemrevision':filemrevision,'meta_type':self.meta_type}) 301 if filepath in ids :302 if filepath in ids or '*' in ids: 302 303 xml = self.exportMetaobjXml([id]) 303 304 _fileutil.exportObj(xml,filepath) … … 317 318 file = open(filepath) 318 319 # Execute action. 319 if filepath in ids :320 if filepath in ids or '*' in ids: 320 321 ob.metaobj_manager.importMetaobjXml( file) 321 322 elif filepath.endswith(suffix): … … 345 346 filepath = path+'/'+filename 346 347 # Execute action. 347 if filepath in ids :348 if filepath in ids or '*' in ids: 348 349 self.delMetaobj(id) 349 350 elif not os.path.exists( filepath): -
ZMS/trunk/_confmanager.py
r794 r796 311 311 if action: 312 312 l.append({'action':action,'filepath':filepath,'mtime':mtime,'filemtime':filemtime,'meta_type':meta_type}) 313 if filepath in ids :313 if filepath in ids or '*' in ids: 314 314 _fileutil.exportObj(ob,filepath) 315 315 atime = mtime … … 322 322 action = 'add' 323 323 l.append({'action':action,'filepath':filepath,'meta_type':meta_type}) 324 if filepath in ids :324 if filepath in ids or '*' in ids: 325 325 _fileutil.mkDir(filepath) 326 326 l.extend( self.svnCopy(ob,filepath,ids)) … … 353 353 elif filename != '.svn': 354 354 if ob is None: 355 if filepath in ids :355 if filepath in ids or '*' in ids: 356 356 node.manage_addFolder( id, 'New Folder') 357 357 ob = getattr( node, id, None) … … 366 366 if filename.endswith('.dtml'): 367 367 meta_type = 'DTML Method' 368 if filepath in ids :368 if filepath in ids or '*' in ids: 369 369 node.manage_addDTMLMethod( id=id, title='New DTML Method') 370 370 elif filename.endswith('.py'): 371 371 meta_type = 'Script (Python)' 372 if filepath in ids :372 if filepath in ids or '*' in ids: 373 373 PythonScript.manage_addPythonScript( node, id) 374 374 elif filename.lower().endswith('.gif') or \ … … 376 376 filename.lower().endswith('.png'): 377 377 meta_type = 'Image' 378 if filepath in ids :378 if filepath in ids or '*' in ids: 379 379 node.manage_addImage( id=id, file='', title='') 380 380 else: 381 381 meta_type = 'File' 382 if filepath in ids :382 if filepath in ids or '*' in ids: 383 383 node.manage_addFile( id=id, file='', title='') 384 384 ob = getattr( node, id, None) … … 393 393 if action: 394 394 l.append({'action':action,'filepath':filepath,'mtime':mtime,'filemtime':filemtime,'meta_type':meta_type}) 395 if filepath in ids :395 if filepath in ids or '*' in ids: 396 396 file = open(filepath) 397 397 data = file.read() … … 414 414 meta_type = ob.meta_type 415 415 l.append({'action':action,'filepath':filepath,'mtime':mtime,'filemtime':filemtime,'meta_type':meta_type}) 416 if filepath in ids :416 if filepath in ids or '*' in ids: 417 417 node.manage_delObjects( ids=[id]) 418 418 return l -
ZMS/trunk/changes.txt
r795 r796 1402 1402 [01284] Removed getCoords() from main_js. 1403 1403 Measure: Use position() from jquery.position instead! Re-Import ZMSTable from zms-defaults. 1404 ---------------------------------------------------------------------------------------------------- 1404 -------------------------------------------------- 1405 2009-11-12:zms2-2.12.1-03 1406 [01285] Added support for auto-replication to local-fs: ids:list=*. 1407 [01286] Applied fix for non-repetitive sub-objects with id-suffix. 1408 Measure: Call initObjChildren() on container-objects. 1409 -------------------------------------------------- 1410 2009-11-12:zms2-2.12.1-04 1411 [01287] Applied fix for ZMSTable: ValueError for table_type=4 in MSIE (reported by xm). 1412 Measure: Re-import content-object configuration for ZMSTable [1.2.0] 1413 [01288] Applied fix for inlined submit-buttons after last primitive-attribute before first complex-attribute. 1414 -------------------------------------------------- -
ZMS/trunk/dtml/ZMSContainerObject/manage_main.dtml
r794 r796 12 12 ><dtml-else 13 13 ><dtml-call "REQUEST.set('id_prefix','e')" 14 ><dtml-call "initObjChildren(REQUEST)" 14 15 ></dtml-if 15 16 -
ZMS/trunk/dtml/ZMSObject/input_fields.dtml
r750 r796 1 <dtml-in "getMetaobjAttrIds(metaObj['id'])" 2 ><dtml-let objAttr="getMetaobjAttr(metaObj['id'],_['sequence-item'])" 1 <dtml-let metaobjAttrIds="getMetaobjAttrIds(metaObj['id'])" 2 ><dtml-in metaobjAttrIds 3 ><dtml-let sx=sequence-index 4 si=sequence-item 5 objAttr="getMetaobjAttr(metaObj['id'],_['sequence-item'])" 3 6 key="objAttr['id']" 4 7 required="objAttr.get('mandatory',0)==1 and objAttr['id'] not in REQUEST.get('ZMS_OPTIONAL_ELEMENTS',[])" … … 79 82 </td> 80 83 </tr> 81 </dtml-in> 82 </dtml-unless> 84 </dtml-in 85 ><dtml-call "REQUEST.set('ZMS_LAST_OBJECT_WAS_PRIMITIVE',False)" 86 ></dtml-unless> 83 87 84 88 <dtml-comment> … … 88 92 ><dtml-unless "isPageContainer() and key=='e'" 89 93 ><dtml-if ZMS_LAST_OBJECT_WAS_PRIMITIVE 90 ><dtml-unless omit_submitBtn><dtml-unless "REQUEST.get('submitBtnCount') is not None"><tr><td colspan="2"><dtml-var f_submitBtn></td></tr></dtml-unless></dtml-unless 94 ><dtml-unless omit_submitBtn 95 ><dtml-unless "REQUEST.get('submitBtnCount') is not None" 96 ><dtml-let primitiveMetaobjAttrIds="getMetaobjAttrIds(metaObj['id'],metaobj_manager.valid_types)" 97 ><dtml-unless "primitiveMetaobjAttrIds[-1] in metaobjAttrIds[sx:]" 98 ><tr><td colspan="2"><dtml-var f_submitBtn></td></tr 99 ><dtml-call "REQUEST.set('omit_submitBtn',True)" 100 ></dtml-unless 101 ></dtml-let 102 ></dtml-unless 103 ></dtml-unless 91 104 ></dtml-if 92 105 ><dtml-var "f_selectObject(_,_,elLabel=elLabel,objAttr=objAttr)" … … 152 165 ></dtml-if 153 166 ></dtml-let 154 ></dtml-in> 155 156 <dtml-call "REQUEST.set('omit_submitBtn',REQUEST.get('ZMS_LAST_OBJECT_WAS_PRIMITIVE')==False and REQUEST.get('submitBtnCount') is not None)"> 167 ></dtml-in 168 ></dtml-let> -
ZMS/trunk/dtml/ZMSObject/manage_main.dtml
r793 r796 19 19 <dtml-else> 20 20 <dtml-unless fmName><dtml-call "REQUEST.set('fmName', 'form0')"></dtml-unless 21 ><dtml-call "initObjChildren(REQUEST)" 21 22 ><form id="<dtml-var fmName>" name="<dtml-var fmName>" action="manage_changeProperties" method="post" enctype="multipart/form-data" onsubmit="return onFormSubmit('form0')" 22 23 ><input type="hidden" name="preview" value="preview" -
ZMS/trunk/import/zms.metaobj.xml
r795 r796 2570 2570 { 2571 2571 var xml = ''; 2572 var type = parseInt($('input[name=t able_type:int]:checked').val());2572 var type = parseInt($('input[name=type:int]:checked').val()); 2573 2573 xml += '<list>\n'; 2574 2574 for ( var y = 0; y < parseInt($('#rows').val()); y++) { … … 2584 2584 else { 2585 2585 for ( var x = 0; x < parseInt($('#cols').val()); x++) { 2586 var tag = "td";2587 if ( (type == 1 && y == 0) ||2588 (type == 3 && x == 0) ||2589 (type == 4 && (x == 0 || y == 0)))2590 tag = "th";2591 2586 xml += '<item type=\"dictionary\"><dictionary>\n'; 2592 xml += '<item key="colspan" type="int">1</item>\n'; 2593 xml += '<item key="content"></item>\n'; 2594 xml += '<item key="format"><dtml-var "getTextFormatDefault()"></item>\n'; 2595 xml += '<item key="tag">'+tag+'</item>\n'; 2587 if ( y==0 && x == 0 && type == 4) { 2588 xml += '<item key="colspan" type="int">1</item>\n'; 2589 } 2590 else { 2591 var tag = "td"; 2592 if ( (type == 1 && y == 0) || 2593 (type == 3 && x == 0) || 2594 (type == 4 && (x == 0 || y == 0))) { 2595 tag = "th"; 2596 } 2597 xml += '<item key="colspan" type="int">1</item>\n'; 2598 xml += '<item key="content"></item>\n'; 2599 xml += '<item key="format"><dtml-var "getTextFormatDefault()"></item>\n'; 2600 xml += '<item key="tag">'+tag+'</item>\n'; 2601 } 2596 2602 xml += '</dictionary></item>\n'; 2597 2603 } … … 2637 2643 </tr> 2638 2644 <tr> 2639 <td valign="middle" rowspan="3"><input class="form-radio" type="radio" name="t able_type:int" value="1" checked="checked"></td>2645 <td valign="middle" rowspan="3"><input class="form-radio" type="radio" name="type:int" value="1" checked="checked"></td> 2640 2646 <td> 2641 2647 <div class="ZMSTable"> … … 2657 2663 <table cellspacing="2" cellpadding="0" border="0"> 2658 2664 <tr> 2659 <td valign="middle"><input class="form-radio" type="radio" name="t able_type:int" value="2"></td>2665 <td valign="middle"><input class="form-radio" type="radio" name="type:int" value="2"></td> 2660 2666 <td> 2661 2667 <div class="ZMSTable"> … … 2675 2681 <table cellspacing="2" cellpadding="0" border="0"> 2676 2682 <tr> 2677 <td valign="middle"><input class="form-radio" type="radio" name="t able_type:int" value="3"></td>2683 <td valign="middle"><input class="form-radio" type="radio" name="type:int" value="3"></td> 2678 2684 <td> 2679 2685 <div class="ZMSTable"> … … 2693 2699 <table cellspacing="2" cellpadding="0" border="0"> 2694 2700 <tr> 2695 <td valign="middle"><input class="form-radio" type="radio" name="t able_type:int" value="4"></td>2701 <td valign="middle"><input class="form-radio" type="radio" name="type:int" value="4"></td> 2696 2702 <td> 2697 2703 <div class="ZMSTable"> … … 2719 2725 </tr> 2720 2726 <tr> 2721 <td valign="middle"><input class="form-radio" type="radio" name="t able_type:int" value="5"></td>2727 <td valign="middle"><input class="form-radio" type="radio" name="type:int" value="5"></td> 2722 2728 <td> 2723 2729 <div class="ZMSTable"> … … 2800 2806 xml += "<item type=\"dictionary\"><dictionary>\n"; 2801 2807 var colspan = $(el_tds[j]).attr("colspan"); 2808 2802 2809 if ( colspan) { 2803 2810 xml += '<item key="colspan" type="int">'+colspan+'</item>\n'; … … 2810 2817 else { 2811 2818 xml += '<item key="colspan" type="int">1</item>\n'; 2812 xml += '<item key="content"></item>\n';2813 xml += '<item key="format"></item>\n';2814 xml += '<item key="tag">td</item>\n';2815 2819 } 2816 2820 xml += '</dictionary></item>\n'; … … 3209 3213 <dtml-let table_row=sequence-item> 3210 3214 <dtml-in table_row mapping> 3211 <dtml-let col_index=sequence-index table_cell=sequence-item table_cell_weight="len(re_sub('<(.*?)>', '', dt_html( content,REQUEST)))">3215 <dtml-let col_index=sequence-index table_cell=sequence-item table_cell_weight="len(re_sub('<(.*?)>', '', dt_html(table_cell.get('content',''),REQUEST)))"> 3212 3216 <dtml-call "operator_setitem(table_weights,col_index,table_weights[col_index]+table_cell_weight)"> 3213 3217 </dtml-let> … … 3290 3294 ><tr class="<dtml-if sequence-odd>odd<dtml-else>even</dtml-if>" 3291 3295 ><dtml-in table_row mapping 3292 ><dtml-let col_index=sequence-index col_text="dt_html(renderText(format,'table_%i_%i'%(col_index,row_index),content,REQUEST),REQUEST)" 3293 ><<dtml-var tag><dtml-if "colspan>1"> colspan="<dtml-var colspan>"</dtml-if> 3294 ><dtml-if col_text><dtml-var col_text><dtml-else> </dtml-if 3295 ></<dtml-var tag> 3296 ></dtml-let 3296 ><dtml-if tag 3297 ><dtml-let col_index=sequence-index col_text="dt_html(renderText(format,'table_%i_%i'%(col_index,row_index),content,REQUEST),REQUEST)" 3298 ><<dtml-var tag><dtml-if "colspan>1"> colspan="<dtml-var colspan>"</dtml-if> 3299 ><dtml-if col_text><dtml-var col_text><dtml-else> </dtml-if 3300 ></<dtml-var tag> 3301 ></dtml-let 3302 ><dtml-else 3303 ><td style="background:transparent;"></td 3304 ></dtml-if 3297 3305 ></dtml-in 3298 3306 ></tr … … 3347 3355 <item key="name"><![CDATA[ZMSTable]]></item> 3348 3356 <item key="package"><![CDATA[com.zms.foundation]]></item> 3349 <item key="revision"><![CDATA[1. 1.0]]></item>3357 <item key="revision"><![CDATA[1.2.0]]></item> 3350 3358 <item key="type"><![CDATA[ZMSObject]]></item> 3351 3359 </dictionary> -
ZMS/trunk/version.txt
r795 r796 1 ZMS2 2.12.1-0 21 ZMS2 2.12.1-04 -
ZMS/trunk/zmstrashcan.py
r752 r796 206 206 # -------------------------------------------------------------------------- 207 207 def getTitle(self, REQUEST): 208 try:209 x = self.display_type(REQUEST) + " (" + str(len(self.getChildNodes(REQUEST))) + " " + self.getLangStr('ATTR_OBJECTS',REQUEST['lang']) + ")"210 except:211 print self.display_type(REQUEST)212 208 return self.display_type(REQUEST) + " (" + str(len(self.getChildNodes(REQUEST))) + " " + self.getLangStr('ATTR_OBJECTS',REQUEST['lang']) + ")" 213 209
Note: See TracChangeset
for help on using the changeset viewer.
