Ignore:
Timestamp:
21.07.2010 22:19:32 (22 months ago)
Author:
zmsdev
Message:

Added support for defaults of mandatory sub-objects, insert-commands and programmatic zexp import.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ZMS/trunk/zmscontainerobject.py

    r1031 r1122  
    620620              actions.append( action) 
    621621       
     622      #-- Insert Commands. 
     623      actions.extend(self.filtered_command_actions(path,REQUEST,insert_actions=True)) 
     624       
    622625      #-- Sort. 
    623626      actions.sort() 
    624627       
    625       #-- Headline, 
     628      #-- Headline. 
    626629      if len(actions) > 0: 
    627630        actions.insert(0,('----- %s -----'%self.getZMILangStr('ACTION_INSERT')%self.display_type(REQUEST),'')) 
     
    10011004      attr = self.getMetaobjAttr( meta_id, key) 
    10021005      zexp = attr[ 'custom'] 
    1003       filename = zexp.title_or_id() 
    1004       fileid = filename[:filename.find('.')] 
    1005       filepath = INSTANCE_HOME + '/import/' + filename 
    1006       _fileutil.exportObj( zexp, filepath) 
    1007       _fileutil.importZexp( self, filename) 
    1008        
    1009       ##### Create #### 
    10101006      id_prefix = _globals.id_prefix(REQUEST.get('id_prefix','e')) 
    10111007      new_id = self.getNewId(id_prefix) 
    1012        
    1013       ##### Rename #### 
    1014       self.manage_renameObject(fileid,new_id) 
    1015        
    1016       ##### Normalize Sort-IDs #### 
    1017       obj = getattr( self, new_id) 
    1018       obj.sort_id = _sort_id 
    1019       self.normalizeSortIds( id_prefix) 
     1008      _fileutil.import_zexp(self,zexp,new_id,id_prefix,_sort_id) 
    10201009       
    10211010      # Return with message. 
Note: See TracChangeset for help on using the changeset viewer.