Ejemplo n.º 1
0
 public static function serialize($var, $force_obj = false)
 {
     if ($force_obj) {
         return JSHelper::cast_obj($var);
     } else {
         return JSHelper::cast($var);
     }
 }
Ejemplo n.º 2
0
<?php

$this->pageTitle = "作品管理 - 會員中心 - ";
?>

<ol class="breadcrumb">
    <li class="active"> <span class="glyphicon glyphicon-chevron-down"></span> 我的作品列表</li>
</ol>

<?php 
$this->widget('zii.widgets.CListView', array('dataProvider' => $model->onlyBelongToUser(Yii::app()->user->id)->search(), 'emptyText' => '沒有相關作品', 'enablePagination' => true, 'summaryText' => '共 {count} 作品', 'template' => '<div class="pagination pull-right"><h6>{summary}</h6></div>{pager}<div class="clearfix"></div>{items}{pager}', 'itemView' => '_manageGroup', 'afterAjaxUpdate' => JSHelper::ListViewAfterAjaxUpdate(), 'ajaxUpdate' => true, 'itemsCssClass' => 'row', 'pagerCssClass' => 'whatever', 'pager' => array('maxButtonCount' => 5, 'cssFile' => null, 'pageSize' => 10, 'header' => '', 'firstPageLabel' => '|&lt;', 'prevPageLabel' => '&lt;', 'nextPageLabel' => '&gt;', 'lastPageLabel' => '&gt;|', 'hiddenPageCssClass' => 'disabled', 'internalPageCssClass' => '', 'nextPageCssClass' => '', 'previousPageCssClass' => '', 'lastPageCssClass' => '', 'firstPageCssClass' => '', 'selectedPageCssClass' => 'active', 'htmlOptions' => array('class' => 'pagination'))));
Ejemplo n.º 3
0
/* @var $this IllustController */
/* @var $dataProvider CActiveDataProvider */
$this->breadcrumbs = array('Illusts');
$this->pageTitle = "活動場次 - ";
?>

<ol class="breadcrumb">
    <li class="active"> <span class="glyphicon glyphicon-chevron-down"></span> 活動列表</li>
</ol>

        <?php 
$form = $this->beginWidget('CActiveForm', array('action' => Yii::app()->createUrl($this->route), 'method' => 'get'));
?>
                <div class="row">
                        <?php 
$this->renderPartial('/site/_BSSortDropDownListWidget', array('model' => $model, 'form' => $form, 'defaultDesc' => false));
?>

                        <?php 
$this->renderPartial('/site/_BSSortRevertWidget', array('model' => $model, 'defaultDesc' => false));
?>
                </div>                               
        <?php 
$this->endWidget();
?>


<?php 
$this->widget('zii.widgets.CListView', array('dataProvider' => $indexData, 'emptyText' => '沒有相關活動', 'enablePagination' => true, 'summaryText' => '共 {count} 活動', 'template' => '<div class="pagination pull-right"><h6>{summary}</h6></div>{pager}<div class="clearfix"></div>{items}{pager}', 'itemView' => '_singleEventItem', 'ajaxUpdate' => true, 'itemsCssClass' => 'row', 'pagerCssClass' => 'whatever', 'afterAjaxUpdate' => JSHelper::ListViewAfterAjaxUpdate(), 'pager' => array('maxButtonCount' => 5, 'cssFile' => null, 'pageSize' => 6, 'header' => '', 'firstPageLabel' => '|&lt;', 'prevPageLabel' => '&lt;', 'nextPageLabel' => '&gt;', 'lastPageLabel' => '&gt;|', 'hiddenPageCssClass' => 'disabled', 'internalPageCssClass' => '', 'nextPageCssClass' => '', 'previousPageCssClass' => '', 'lastPageCssClass' => '', 'firstPageCssClass' => '', 'selectedPageCssClass' => 'active', 'htmlOptions' => array('class' => 'pagination'))));
Ejemplo n.º 4
0
 public static function get_language_js($language, $text, $arg1 = null, $arg2 = null)
 {
     $args = func_get_args();
     $text = call_user_func_array(array('ZPHP\\String', 'get_language'), $args);
     return JSHelper::cast_str($text);
 }
Ejemplo n.º 5
0
JSHelper::lockSubmitButtonOnSubmit();
JSHelper::preventEnterKeySubmit();
JSHelper::ApplyServersideValidationErrorToInputField();
?>

<ol class="breadcrumb">
        <li class="active"> <span class="glyphicon glyphicon-chevron-down"></span>個人資料更新</li>
</ol>
		
    <div class="row">
    <div class="col-md-4 col-md-push-7" style="">
 
    </div>
    <div class="col-md-7 col-md-pull-4" style="">
        <?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'userUpdate-form', 'enableClientValidation' => true, 'enableAjaxValidation' => false, 'htmlOptions' => array('class' => 'form col-md-12 center-block', 'enctype' => 'multipart/form-data', 'multiple' => 'multiple'), 'clientOptions' => JSHelper::CActiveFormClientOptionsForBSWidget(), 'focus' => array($model, 'illust_title'), 'errorMessageCssClass' => 'has-error'));
?>
        
            <div class="form-group ">
                <label >使用者名稱</label>    
                <input class="form-control" placeholder="" type="text" maxlength="50" value="<?php 
echo $model->user_name;
?>
" disabled="disabled">        
            </div>
        
            <?php 
$this->renderPartial('/site/_BSTextFieldWidget', array('form' => $form, 'fieldName' => 'email', 'model' => $model, 'explanationText' => ''));
?>
        
            <?php 
Ejemplo n.º 6
0
<?php

$this->pageTitle = Yii::app()->name . ' - 更新登入密碼';
CHtml::$afterRequiredLabel = '';
JSHelper::ApplyServersideValidationErrorToInputField();
?>

<div class="row">
<div class="col col-xs-1 col-sm-2 col-md-3 col-lg-3"></div>
<div class="col col-xs-10 col-sm-8 col-md-6 col-lg-5">
<div class="panel panel-default">
<div class="panel-heading"><h3 class="text-center">更新登入密碼</h3></div>
  <div class="panel-body">
        <?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'register-form', 'enableClientValidation' => true, 'enableAjaxValidation' => false, 'clientOptions' => array('validateOnSubmit' => true, 'afterValidate' => 'js:function(form, data, hasError) { 
                  if(hasError) {
                      for(var i in data) $("#"+i).parent(".form-group").addClass("has-error");
                      return false;
                  }
                  else {
                      form.children().parent(".form-group").removeClass("has-error");
                      return true;
                  }
              }', 'afterValidateAttribute' => 'js:function(form, attribute, data, hasError) {
               if(hasError) 
                    $("#"+attribute.id).parent(".form-group").addClass("has-error");
               else 
                    $("#"+attribute.id).parent(".form-group").removeClass("has-error"); 
              }'), 'htmlOptions' => array('class' => 'form col-md-12 center-block'), 'focus' => array($model, 'username'), 'errorMessageCssClass' => ''));
?>
            
Ejemplo n.º 7
0
 public static function js_include_style($style)
 {
     $args = func_get_args();
     $paths = self::_parse_array_args($args);
     $html = "(function(e){var t=[];var n=document.getElementsByTagName('link');var r=document.getElementsByTagName('head')[0];for(var i=0;i<n.length;i++){var s=n[i];var o=s.getAttribute('rel');if(o&&o=='stylesheet'){t.push(s.getAttribute('href'))}}for(var i=0;i<e.length;i++){e[i]={'file': e[i], 'media': 'all'};var u=e[i];if(!(t.indexOf(u['file'])>=0)){var a=document.createElement('link');a.setAttribute('type','text/css');a.setAttribute('rel','stylesheet');a.setAttribute('href',u['file']);a.setAttribute('media',u['media']);r.appendChild(a);t.push(u['file'])}}})(" . JSHelper::cast_array($paths) . ");\n";
     return $html;
 }
Ejemplo n.º 8
0
if ($isNextTimeWillBeDesc) {
    //if current state is asscending ,then prepare for the descending option
    $AppendOptions = array();
    foreach ($options as $dropdownlistValue => $dropdownlistText) {
        $AppendOptions[$dropdownlistValue . '.desc'] = $dropdownlistText;
    }
    $options = $AppendOptions;
}
/** remain the selected sort option */
$selectedVal = "";
//default unselected
if (isset($_GET[$name]) && !empty($_GET[$name])) {
    $selectedVal = $_GET[$name];
    //replace .desc no matter it exist or not
    $selectedVal = str_replace('.desc', '', $selectedVal);
    foreach ($options as $dropdownlistValue => $dropdownlistText) {
        if (strpos($dropdownlistValue, $selectedVal) !== false) {
            $selectedVal = $dropdownlistValue;
        }
    }
}
JSHelper::SubmitOnDropDownListChange('#' . $dropdownlistId);
?>

<div class="input-group input-group-sm col-xs-12 col-sm-4 col-md-3 col-lg-3">
        <span class="input-group-addon">Sort</span>
                    <?php 
echo CHtml::dropDownList($name, $selectedVal, $options, array('class' => 'form-control', 'id' => $dropdownlistId));
?>
 
</div><!-- filter item 1 -->
Ejemplo n.º 9
0
$this->pageTitle = "喜愛的作者作品 - 會員中心 - ";
?>

<ol class="breadcrumb">
    <li class="active"> <span class="glyphicon glyphicon-chevron-down"></span> 喜愛的作者作品列表</li>
</ol>

        <?php 
$form = $this->beginWidget('CActiveForm', array('action' => Yii::app()->createUrl($this->route), 'method' => 'get'));
?>
						<div class="row">
							<?php 
$this->renderPartial('/site/_BSFilterDropDownListWidget', array('form' => $form, 'fieldName' => 'illust_category_enum', 'model' => $model));
?>

							<?php 
$this->renderPartial('/site/_BSSortDropDownListWidget', array('model' => $model, 'form' => $form, 'defaultDesc' => false));
?>
                                                    
                                                    <?php 
$this->renderPartial('/site/_BSSortRevertWidget', array('model' => $model, 'defaultDesc' => false));
?>
						</div>
<?php 
$this->endWidget();
?>


<?php 
$this->widget('zii.widgets.CListView', array('dataProvider' => $model->showOnlyFollowingAuther($user->getFollowingUsersIdArr())->search(), 'emptyText' => '沒有相關作品', 'enablePagination' => true, 'summaryText' => '共 {count} 作品', 'template' => '<div class="pagination pull-right"><h6>{summary}</h6></div>{pager}<div class="clearfix"></div>{items}{pager}', 'itemView' => 'application.views.illust._singleIllustItem', 'ajaxUpdate' => true, 'afterAjaxUpdate' => JSHelper::ListViewAfterAjaxUpdate(), 'itemsCssClass' => 'row', 'pagerCssClass' => 'whatever', 'pager' => array('maxButtonCount' => 5, 'cssFile' => null, 'pageSize' => 6, 'header' => '', 'firstPageLabel' => '|&lt;', 'prevPageLabel' => '&lt;', 'nextPageLabel' => '&gt;', 'lastPageLabel' => '&gt;|', 'hiddenPageCssClass' => 'disabled', 'internalPageCssClass' => '', 'nextPageCssClass' => '', 'previousPageCssClass' => '', 'lastPageCssClass' => '', 'firstPageCssClass' => '', 'selectedPageCssClass' => 'active', 'htmlOptions' => array('class' => 'pagination'))));
Ejemplo n.º 10
0
/* @var $this IllustController */
/* @var $model Illust */
/* @var $form CActiveForm */
JSHelper::ApplyServersideValidationErrorToInputField();
?>
<ol class="breadcrumb">
        <li class="active"> <span class="glyphicon glyphicon-chevron-down"></span>更新作品資料</li>
</ol>
		
    <div class="row">
    <div class="col-md-2" style="">
    </div>
    <div class="col-md-7" style="">
<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'illust-form', 'enableClientValidation' => true, 'htmlOptions' => array('class' => 'form col-md-12 center-block'), 'clientOptions' => JSHelper::CActiveFormClientOptionsForBSWidget(), 'focus' => array($model, 'illust_title'), 'errorMessageCssClass' => 'has-error'));
?>

	<?php 
$this->renderPartial('/site/_BSTextFieldWidget', array('form' => $form, 'fieldName' => 'illust_title', 'model' => $model, 'explanationText' => ''));
?>
                
            <?php 
$this->Widget('TagWidget', array('form' => $form, 'fieldName' => 'tag', 'model' => $model, 'explanationText' => ''));
?>
                
            <?php 
$this->renderPartial('/site/_BSTextAreaWidget', array('form' => $form, 'fieldName' => 'illust_summary', 'model' => $model, 'rows' => '5', 'explanationText' => ''));
?>
                
                
Ejemplo n.º 11
0
 public static function call_quote($func_name, $arg1 = null, $arg2 = null)
 {
     $func_args = func_get_args();
     return JSHelper::call_array($func_name, array_slice($func_args, 1), true);
 }
Ejemplo n.º 12
0
<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
JSHelper::SubmitOnDropDownListChange('#GroupSelect');
$this->pageTitle = "組織管理 - 會員中心 - ";
?>

<h4>組織管理</h4>
<div class="panel">
    <div class="panel-body">
        <?php 
$form = $this->beginWidget('CActiveForm', array());
?>

        <div class="row">
            <div class="input-group input-group-sm col-xs-12 col-sm-4 col-md-3 col-lg-3">
            <span class="input-group-addon">正在管理</span>
            <select id="GroupSelect" name="manageGroupId" class=" form-control">
            <?php 
for ($i = 0; $i < count($ownedGroupArray); $i++) {
    $group = $ownedGroupArray[$i];
    $isSelected = "";
    if ($manageGroup->id == $group->id) {
        $isSelected = "selected";
    }
    print "<option value='" . $group->id . "' " . $isSelected . ">" . $group->group_name . "</option>";
}