本文整理汇总了PHP中TreeDropdownField::Field方法的典型用法代码示例。如果您正苦于以下问题:PHP TreeDropdownField::Field方法的具体用法?PHP TreeDropdownField::Field怎么用?PHP TreeDropdownField::Field使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TreeDropdownField
的用法示例。
在下文中一共展示了TreeDropdownField::Field方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Field
public function Field($properties = array())
{
Requirements::javascript(THIRDPARTY_DIR . '/jquery-livequery/jquery.livequery.js');
Requirements::javascript('pixlr/thirdparty/supa/Supa.js');
Requirements::javascript('pixlr/javascript/supa-field.js');
Requirements::css('pixlr/css/pixlr.css');
$id = $this->id();
$div = '<div id="' . $id . 'Container" class="' . $this->extraClass() . ' supaField">';
$div .= '<div class="supaButtons">';
$div .= $this->createTag('input', array('id' => $id . 'Paste', 'value' => _t('Pixlr.PASTE', 'Paste'), 'type' => 'button', 'class' => 'supaPasteButton'));
$div .= $this->createTag('input', array('id' => $id . 'Upload', 'value' => _t('Pixlr.UPLOAD', 'Upload'), 'type' => 'button', 'class' => 'supaUploadButton', 'style' => 'display: none'));
$div .= $this->createTag('input', array('type' => 'checkbox', 'value' => '1', 'name' => 'AndEdit', 'id' => $id . 'AndEdit'));
$div .= '<label for="' . $id . 'AndEdit' . '">and Edit</label>';
$div .= $this->createTag('input', array('class' => 'supaFileID', 'type' => 'hidden', 'value' => ''));
$div .= '</div><div class="supaOptions" style="display: none">';
if ($this->options['show_selector']) {
$treeField = new TreeDropdownField('SupaLocation', _t('Pixlr.UPLOAD_LOCATION', 'Save to'), 'File');
$div .= $treeField->Field();
} else {
// create a default target for uploading to
$target = Folder::findOrMake($this->options['target']);
$div .= $this->createTag('input', array('type' => 'hidden', 'name' => 'SupaLocation', 'value' => $target->ID));
}
$div .= $this->createTag('input', array('id' => $id . 'Filename', 'value' => $this->options['name'], 'name' => 'SupaImageName'));
$params = array('parent' => '{input[name=FolderID]}', 'force' => true, 'imgstate' => 'existing', 'title' => '{#' . $id . 'Filename}.png');
$pixlr = new PixlrEditorField('EditSelectedImage' . $id, _t('Pixlr.EDIT_SELECTED', 'Edit Selected'), '{#' . $id . 'Container .supaFileID}', $params);
$div .= $pixlr->Field();
$div .= '</div><div class="supaFileUrl"></div><div class="supaAppletWrapper" id="' . $id . 'AppletWrapper">';
$url = Director::absoluteBaseURL() . 'pixlr/thirdparty/supa/Supa.jar';
$div .= '<applet id="' . $id . 'Applet" class="supaApplet"
archive="' . $url . '"
code="de.christophlinder.supa.SupaApplet"
width="' . $this->options['width'] . '"
height="' . $this->options['height'] . '">
<!--param name="clickforpaste" value="true"-->
<param name="imagecodec" value="png">
<param name="encoding" value="base64">
<param name="previewscaler" value="fit to canvas">
<!--param name="trace" value="true"-->
Applets disabled :(
</applet> ';
$div .= '</div></div>';
return $div;
}
示例2: Field
function Field($properties = array())
{
$html = parent::Field($properties);
Requirements::javascript('subsites/javascript/SubsitesTreeDropdownField.js');
return $html;
}
示例3: Field
function Field()
{
$html = parent::Field();
Requirements::javascript('subsites/javascript/SubsitesTreeDropdownField.js');
return $html;
}