Пример #1
0
 function site_keywords($attrs)
 {
     //$html[] = html::script('$common/js/zotop.keywords.js');
     $html[] = '<div class="field-wrapper clearfix">';
     $html[] = '	' . field::text($attrs);
     $html[] = '	<span class="field-handle">';
     $html[] = '		&nbsp;<a class="setkeywords" style="display:inline-block;" valueto="' . $attrs['name'] . '" title="' . zotop::t('常用关键词') . '"><span class="zotop-icon zotop-icon-keywords"></span></a>';
     $html[] = '	</span>';
     $html[] = '</div>';
     return implode("\n", $html);
 }
Пример #2
0
 /**
  * 图片上传输入框
  *
  * @param $attrs array 控件参数
  * @return string 控件代码
  */
 public static function image($attrs)
 {
     $attrs['handle'] = empty($attrs['handle']) ? zotop::url('zotop/upload/image') : $attrs['handle'];
     $html[] = html::script(url::common() . '/js/zotop.upload.js');
     $html[] = '<div class="field-inner inline-block">';
     $html[] = '	' . field::text($attrs);
     $html[] = '	' . html::input(array('type' => 'button', 'class' => 'upload-image', 'title' => zotop::t('上传图片')));
     $html[] = '</div>';
     return implode("\n", $html);
 }
Пример #3
0
 /**
  * 图片上传输入框
  * 
  * @param $attrs array 控件参数
  * @return string 控件代码
  */
 public static function image($attrs)
 {
     $html[] = '<div class="field-inner">';
     $html[] = field::text($attrs);
     $html[] = html::input(array('type' => 'button', 'class' => 'upload-image', 'for' => $attrs['name'], 'value' => t('上传图片'), 'title' => t('上传图片')));
     $html[] = '</div>';
     return implode("\n", $html);
 }
Пример #4
0
 public static function date($attrs)
 {
     $attrs = array_merge((array) $attrs, array('onfocus' => 'WdatePicker({dateFmt:"yyyy-MM-dd",isShowClear:false,readOnly:true})'));
     $html[] = html::script('$common/js/datepicker/WdatePicker.js');
     $html[] = field::text($attrs);
     return implode("\n", $html);
 }
Пример #5
0
 function field_template($attrs)
 {
     $html[] = field::text($attrs);
     $html[] = '<a class="dialog" href="' . zotop::url('system/template/select/' . $attrs['name']) . '" title="选择模板"><span class="zotop-icon zotop-icon-template"></span></a>';
     return implode("\n", $html);
 }