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[] = ' <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); }
/** * 图片上传输入框 * * @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); }
/** * 图片上传输入框 * * @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); }
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); }
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); }