Asgaroth, on 29 April 2012 - 03:44 PM, said:
in jQuery file upload PHP demo code, in index.PHP a get method is called to display files by default(auto populate). Can we do same thing here to display default?
Posted 29 April 2012 - 03:50 PM
Asgaroth, on 29 April 2012 - 03:44 PM, said:
Posted 30 April 2012 - 08:20 AM
Posted 04 May 2012 - 11:28 AM
Posted 04 May 2012 - 02:27 PM
Asgaroth, on 28 April 2012 - 05:57 PM, said:
Posted 05 May 2012 - 09:16 PM
Posted 07 May 2012 - 04:54 AM
jiaming, on 04 May 2012 - 02:27 PM, said:
Posted 15 May 2012 - 01:38 AM
$this->widget('xupload.XUpload', array(
'url' => Yii::app()->createUrl("site/uploadP"),
'model' => $uploadm,
'attribute' => 'file',
'multiple' => false,
'options'=>array(
'onComplete'=>'js:function(){location.reload(true);}',
)
));
Posted 15 May 2012 - 01:23 PM
manuelpm, on 15 May 2012 - 01:38 AM, said:
$this->widget('xupload.XUpload', array(
'url' => Yii::app()->createUrl("site/uploadP"),
'model' => $uploadm,
'attribute' => 'file',
'multiple' => false,
'options'=>array(
'onComplete'=>'js:function(){location.reload(true);}',
)
));
Posted 15 May 2012 - 01:37 PM
manuelpm, on 15 May 2012 - 01:32 PM, said:
jQuery('#XUploadForm-form').fileupload({'onComplete':function(){location.reload(true);}});
Posted 15 May 2012 - 11:42 PM
Posted 16 May 2012 - 03:43 AM
Posted 16 May 2012 - 12:57 PM
$uploadm = new XUploadForm;
$this->widget('xupload.XUpload', array(
'url' => Yii::app()->createUrl("site/uploadP"),
'model' => $uploadm,
'attribute' => 'file',
'multiple' => false,
'options'=>array(
'completed'=>'js:function(){location.reload(true);}',
//'sent'=>'js:function(){location.reload(true);}',
'maxNumberOfFiles'=>1,
'maxFileSize'=>3000000,
'acceptFileTypes'=>'/(\.|\/)(jpg|png)$/i'
)
));
Posted 16 May 2012 - 01:36 PM
manuelpm, on 16 May 2012 - 12:57 PM, said:
$uploadm = new XUploadForm;
$this->widget('xupload.XUpload', array(
'url' => Yii::app()->createUrl("site/uploadP"),
'model' => $uploadm,
'attribute' => 'file',
'multiple' => false,
'options'=>array(
'completed'=>'js:function(){location.reload(true);}',
//'sent'=>'js:function(){location.reload(true);}',
'maxNumberOfFiles'=>1,
'maxFileSize'=>3000000,
'acceptFileTypes'=>'/(\.|\/)(jpg|png)$/i'
)
));
'acceptFileTypes'=>"'/(\.|\/)(jpg|png)$/i'"
Posted 18 May 2012 - 12:47 AM
Posted 18 May 2012 - 01:28 AM
johnrey1219, on 18 May 2012 - 12:47 AM, said:
Posted 21 May 2012 - 02:26 AM
Posted 21 May 2012 - 09:29 AM
johnrey1219, on 21 May 2012 - 02:26 AM, said:
Posted 01 June 2012 - 08:09 AM
<?php /** @var OfferController $this */ ?>
<div class="row-fluid">
<div class="span12">
<div class="page-header">
<h2>Create an offer</h2>
</div>
<?php
$this->widget('bootstrap.widgets.BootAlert');
/** @var BootActiveForm $form */
$form = $this->beginWidget('bootstrap.widgets.BootActiveForm', array(
'id'=>'create-offer-form',
'enableAjaxValidation'=>true,
'enableClientValidation'=>true,
));
echo $form->errorSummary($offerModel);
?>
<h3>General</h3>
<hr />
<?php
echo $form->textFieldRow($offerModel, 'title', array('class'=>'span3'));
echo $form->textAreaRow($offerModel, 'text');
echo $form->textFieldRow($offerModel, 'price', array('class'=>'span3'));
echo $form->labelEx($offerModel,'Valid from',array(
'class'=>'control-label',
));
$this->widget('zii.widgets.jui.CJuiDatePicker', array(
'model'=>$offerModel,
'attribute' => 'valid_from',
'language' => 'fr',
'defaultOptions' => array(
'showOn' => 'focus',
'changeMonth' => true,
'changeYear' => false,
'showButtonPanel' => true,
),
'options'=>array(
'showAnim'=>'fold',
'dateFormat' => 'yy-mm-dd',
),
'htmlOptions'=>array(
'id' => 'Offer_Valid_from',
'style'=>'height:20px;'
),
));
echo $form->labelEx($offerModel,'Valid till',array(
'class'=>'control-label',
));
$this->widget('zii.widgets.jui.CJuiDatePicker', array(
'model'=>$offerModel,
'attribute' => 'valid_till',
'language' => 'fr',
'defaultOptions' => array(
'showOn' => 'focus',
'changeMonth' => true,
'changeYear' => false,
'showButtonPanel' => true,
),
'options'=>array(
'showAnim'=>'fold',
'dateFormat' => 'yy-mm-dd',
),
'htmlOptions'=>array(
'id' => 'Offer_Valid_till',
'style'=>'height:20px;'
),
));
?>
<h3>Category</h3>
<div class="row-fluid">
<div class="span12">
<?php
$this->widget('zii.widgets.CListView', array(
'dataProvider'=>$categoryDataProvider,
'itemView'=>'//partials/category/_renderSingleGridviewRow',
));
?>
</div>
</div>
<h3>Pictures</h3>
<div class="row-fluid">
<div class="span12">
<?php
$this->widget('xupload.XUpload', array(
'url' => Yii::app()->createUrl("/offer/upload"),
'model' => $offerModel,
'attribute' => 'image',
'multiple' => false,
));
?>
</div>
</div>
<h3>User</h3>
<div class="row-fluid">
<div class="span12">
<?php $this->getGridViewUserFrontend(); ?>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<?php
$this->widget('bootstrap.widgets.BootButton',
array(
'buttonType'=>'submit',
'icon'=>'ok',
'type'=>'primary',
'label'=>'Save',
));
$this->endWidget();
?>
</div>
</div>
<div class="footer">
<hr />
<?php $this->widget('bootstrap.widgets.BootButton', array(
'label'=>'Back',
'type'=>'',
'size'=>'',
'url'=>$this->createUrl('/user/listbe'),
)); ?>
</div>
</div>
</div>
Posted 01 June 2012 - 09:12 AM
nightmove, on 01 June 2012 - 08:09 AM, said: