⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 globalmacros.vm

📁 jetspeed源代码
💻 VM
字号:
#* ------------------------------------------------------------------
#
# Macros that are used for displaying input forms.
#
*# ------------------------------------------------------------------

#macro (text $text)
  <font face="$ui.sansSerifFonts">
    $text
  </font>
#end

#macro (formLabel $label)
  <td bgcolor="$!{skin.TitleBackgroundColor}">
    <b>
      <font face="$ui.sansSerifFonts">
        $label
      </font>
    </b>
  </td>
#end

#macro (formTextField $name $value)
  <td bgcolor="$!{skin.TitleBackgroundColor}">
    <font face="$ui.sansSerifFonts">
      <input type="text" size="30" name="$name" value="$value">
    </font>
  </td>
#end

#macro (textField $name $value $size)
  <font face="$ui.sansSerifFonts">
    <input type="text" size="$size" name="$name" value="$value">
  </font>
#end

#macro (listBox $list)
  <font face="$ui.sansSerifFonts">
    $list
  </font>
#end

#macro (formPasswordCell $label $name $value)
  #formLabel("$label")
  <td bgcolor="$!{skin.TitleBackgroundColor}">
    <font face="$ui.sansSerifFonts">
      <input type="password" size="30" name="$name" value="$value">
    </font>
  </td>
#end

#macro (formReadOnlyCell $label $name $value)
  #formLabel("$label")
  <td bgcolor="$!{skin.TitleBackgroundColor}">
    <font face="$ui.sansSerifFonts">
      <input type="hidden" size="30" name="$name" value="$value">
      $value
    </font>
  </td>
#end

#macro (formCell $label $name $value)
  #formLabel("$label")
  #formTextField("$name" "$value")
#end

#macro (fileUploadField $name)
  <td bgcolor="$!{skin.TitleBackgroundColor}">
    <font face="$ui.sansSerifFonts">
      <input type="file" size="30" name="$name">
    </font>
  </td>
#end

#macro (fileUpload "$label" "$name")
  #formLabel("$label")
  #fileUploadField("$name")
#end

#macro (formCheckBox $name $checked)
  <td bgcolor="$!{skin.TitleBackgroundColor}">
    <input type="checkbox" name="box_$name" #if($checked)checked=1#end/>
  </td>
#end

#macro (formCheckBox2 $label $name $checked)
  #formLabel("$label")
  <td bgcolor="$!{skin.TitleBackgroundColor}">
    <input type="checkbox" name="$name" #if($checked)checked=1#end/>
  </td>
#end

#macro (formListBox $label $list)
  <td bgcolor="$!{skin.TitleBackgroundColor}">
    <b>
      <font face="$ui.sansSerifFonts">
        $label
      </font>
    </b>
  </td>
  <td bgcolor="$!{skin.TitleBackgroundColor}">
    $list
  </td>
#end

#* ------------------------------------------------------------------
#
# Macros that are used for displaying information in tables.
#
*# ------------------------------------------------------------------

#macro (headerCell $body)
  <td>
    <b>     
        $body
    </b>
  </td>
#end

#macro (entryCell $body)
  <td>    
      $body &nbsp;    
  </td>
#end


#* ------------------------------------------------------------------
#
# Macros added for Nebanum
#
*# ------------------------------------------------------------------
#macro (formTextFieldSize $name $value $size)
  <td bgcolor="$!{skin.TitleBackgroundColor}">
    <font face="$ui.sansSerifFonts">
      <input type="text" size="$size" name="$name" value="$value">
    </font>
  </td>
#end
#macro (formCheckBoxEvent $name $checked $event)
  <td bgcolor="$!{skin.TitleBackgroundColor}">
    <input type="checkbox" name="box_$name" #if($checked)checked=1#end $!{events}  />
  </td>
#end

#macro (formFlag $name $checked)
  <input type="checkbox" name="$name" #if($checked)checked=1#end/>
#end

#macro (formSelect $name $list $selectedValue )
  <select name=$name>
  <option value="$selectedValue">$selectedValue</option>  
  #foreach ($item in $list)    
	 <option value="$item">$item</option>
  #end 
  </select>
#end

#macro (omListBox $list $selectedPrimaryKey)
  #foreach ($item in $list)
    #if ($selectedPrimaryKey == $item.getPrimaryKey().getValue())
	 <option value="$item.getPrimaryKey().getValue()" selected>$item.getDisplayValue()</option>
    #else     
	 <option value="$item.getPrimaryKey().getValue()">$item.getDisplayValue()</option>
    #end
  #end 
#end

#macro (image $img $w $h)
  #if ($w == "0")
     <img src="$ui.image($img,$data)" >
  #else
     <img src="$ui.image($img,$data)" width="$w" height="$h">
  #end 
#end


#macro (linkwizard $wizardname $step)
  $link.setAction("PullAction").addQueryData("wizard","$wizardname").addQueryData("step","$step")
#end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -