Code Monkey home page Code Monkey logo

yiiwheels's Introduction

2amigOS!

Latest Stable Version Total Downloads Latest Unstable Version License

Yii Wheels (or Wheels) is an extended library for the YiiStrap extension.

Please, visit YiiWheels site for further documentation of its use.

2amigOS!
web development has never been so fun
www.2amigos.us

yiiwheels's People

Contributors

acorncom avatar albertborsos avatar alxdhere avatar artem-frolov avatar crisu83 avatar d4rkstar avatar dr-darkslide avatar hallerma avatar kabiraparesh avatar kmolchanov avatar leuloch avatar prplhaz4 avatar rob006 avatar sammousa avatar sime15 avatar sn4k3 avatar tonydspaniard avatar vinu avatar xbazilio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yiiwheels's Issues

select2

Hi,

congrats by this great extension. Its really cool.

btw i have a problem with select2. When i have $model and attribute and, at same time, the 'asDropDownList' => false i get this error "htmlspecialchars() expects parameter 1 to be string, array given"

here is my config:

    $pluginOptions =array(
        'multiple' => 'multiple',
        'placeholder'=>GxHtml::encode($model->getRelationLabel('nMunicipioses')),
        'minimumInputLength'=>2,
        'ajax'=>array(
            'url'=> Yii::app()->controller->createUrl('/municipios/ajaxSearch'),
            'dataType'=>'json',
            'data'=>'js:function(term,page){
                                  return {
                                    q: term,
                                    page_limit: 10,
                                  };
                                }',
            'results'=>'js:function(data,page){
                                  return {results: data};
                                }',
        ),
        'formatResult'       => 'js:function(data){
                 return data.name;
             }',
        'formatSelection'    => 'js: function(data) {
                 return data.name;
             }'

    );

$this->widget('yiiwheels.widgets.select2.WhSelect2', array(
'asDropDownList' => false,
'model'=>$model,
'attribute'=>'nMunicipioses',
//'name' => 'Areas[nMunicipioses]',
'pluginOptions' => $pluginOptions
));

And if i set 'name' and unset 'model' the response is a string (csv) with the id's not and array.

i really stuck with these.

thanks

Struggling to find bulk actions

Am trying to move from yii-booster to yiiwheels but struggling to find mention of bulk actions or even "bulk" anything. Has this been renamed or handled differently?

Currently commenting out everywhere I used this for now.

Am wondering if there is still quite a bit missing that was in yii-booster and should I wait a while?

WhCountries CSS problem.

The WhCountries widget uses tag with class to add flags. The CSS used for this however does not take precedence over the standard bootstrap css.

yiistrap

According to http://www.getyiistrap.com/site/index - the main repo for required "yii-twbs/yiistrap" is Crisu83/yiistrap.

Are you going to fix it in composer.json file (of this repo and in examples)?
Or what is the "roadmap" for this component?

Thanks

Add a DateTime Picker

Most database columns I have use a DateTime column as a time column and a real DateTimePicker would be real great here

Add Wizard Widget

Currently Wizard support is not available in yiiwheel which was in yiibooster.
Its a awesome feature.
Please add the support.

Thanks for your great work...

Specify "multiple" html attribute on WhMultiSelect

Without passing 'multiple'=>'multiple' in widget's htmlOptions multiselected values in hidden dropdown input will be restored from model incorrectly, at least in Chrome v28 for Windows.

For now, it can be only workarounded like:

$this->widget('yiiwheels.widgets.multiselect.WhMultiSelect',array(
    // rest of config options - model, attribute, etc
    'htmlOptions'=>array('multiple'=>'multiple')
));

WhEditable bugs

When i try to use WhEditable like this: http://yiiwheels.2amigos.us/site/grid#editablecolumn

I get a "Error 500 include(WhEditable.php): failed to open stream: No such file or directory"
to fix this:

  • Add "Yii::import( 'yiiwheels.widgets.editable.WhEditable' );" on the beginning of the file "WhEditableColumn.php".

Then I get a "Error 500 Property CWebApplication.editable is not defined."
this error come from the line"if ( yii::app()->editable->form != EditableConfig::FORM_BOOTSTRAP ) {" (there are 2 occurrence) in the file "WhEditableColumn.php"
I don't know how to fix this so I commented the two "if" block.

After that I get a "Error 500 include(EditableField.php): failed to open stream: No such file or directory"
to fix that:

  • Change the line "$widgetClass = 'EditableField';" to "$widgetClass = 'WhEditableField';" in the file "WhEditableColumn.php".

After that the page is rendered correctly, but you can't edit.

You need to edit "WhEditableSaver.php":

  • Add "Yii::import( 'yiiwheels.widgets.editable.WhEditableField' );" on the beginning of the file
  • Replace all the occurence of "EditableField::" by "WhEditableField::"

After that it's working for me

(PS: Sorry about my english)

WhPercentOfTypeOperation.php (need to fix the line 15)

Some import commands are wrong.
File: WhPercentOfTypeOperation.php (15) -> change to: Yii::import('yiiwheels.widgets.grid.operations.WhOperation');

File: WhPercentOfTypeOperation.php(15) -> change to: Yii::import('yiiwheels.widgets.grid.operations.WhCountOfTypeOperation');

Create own repo for docs

Please move the docs folder to a new repo, it blows up the size of this package and tends to raise conflicts, eg. when using autocomplete in IDE.

Great work

Great work.

Just wondering when you plan to publish version 1.0.4

Thanks

Multiple issues with WhFileUpload

TypeError: $.widget is not a function
send: function (data) {
jquery...load.js (line 1065)
TypeError: $.blueimp is undefined
[Break On This Error]
...Query('#fileupload-form').fileupload({'url':'/pbside/www/site/upload?type=fine'}...
/pbside/www/ (line 302)
TypeError: $.blueimp is undefined
[Break On This Error]
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
jquery...d-fp.js (line 37)
TypeError: $.blueimp is undefined
[Break On This Error]
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
jquery...d-ui.js (line 38)
TypeError: jQuery(...).fileupload is not a function

probably it's a load order of JS files... i'm looking into it.

WhAceEditor don't work properly with TbActiveForm [ can't save nor validate data ]

If used together with active record model validation doesn't work properly ie. no matter if you type something or not in required fields there is awalys the same error triggered which is field can not be empty. Furthermore it can't save any data i.e to database nor it can populate field with queried data. Here is my use scenario :

...
    <div class="control-group">
        <?php echo $form->labelEx($model,'content',array('class'=>'control-label')); ?>
        <div class="controls">
            <?php 
                $this->widget('yiiwheels.widgets.ace.WhAceEditor', array(
                    'model'=>$model,
                    'attribute'=>'content',
                    'value' => $model->isNewRecord ? '' : $model->content,
                    'htmlOptions'=> array('style' => 'height:450px','class'=>'span11'),
                    'mode'=>'html'
                ));
            ?>
            <?php echo $form->error($model,'content'); ?>
        </div>  
    </div>
...

Or maybe I'm doind it wrong ? If so please tell me how to fix it.

Call to a member function getApi() on a non-object

Hi Antonio!

I've installed Yiistrap+Yiiwheels in my Yii project and tried to use Redactor widget in my admin module, but unfortunately got the following:
Fatal error: Call to a member function getApi() on a non-object in Z:\home...\www\protected\extensions\yiiwheels\behaviors\WhPlugin.php on line 43

Can it be caused by the fact that I'm trying to use it from module? Or because I don't use Composer in my project yet?

Eventually I got it working after adding the following to my config's components section:

'yiiwheels'=>array(
            'class' => 'yiiwheels.YiiWheels',
        ),

Is that correct or am I doing something wrong?

Thanks for the great work you're doing!

What of YiiBooster's features are currently implemented in YiiWheels/YiiStrap?

A sub-set of YiiBoosters features seems to be available at the moment, is this correct? Is the intent of YiiStrap/YiiWheels to be a complete successor of YiiBooster?

An overview-table indicating what is included in YiiBooster vs YiiWheels/YiiStrap would be very helpful in understanding the current status and being able to help port still missing components.

WhRedactor htmlOptions error

If set any parameters in htmlOptions we set it for textarea! But textarea has "display: none;" and its right.

htmlOptions must apply for editor's container.

WhHtml::getOption() bug

Hi!
I'm trying to use WhDateRangePicker widget but have an error:Fatal error: Call to undefined method WhHtml::getOption() in /home/sorokin/htdocs/hut/vendor/crisu83/yiiwheels/widgets/daterangepicker/WhDateRangePicker.php on line 45

My code:

$this->widget(
                    'yiiwheels.widgets.daterangepicker.WhDateRangePicker', array(
                'name' => 'daterangepickertest',
                'htmlOptions' => array('placeholder' => 'Select date')
                    ), true)

redactor.min.js registed at TOP

Hello,

im having trouble with redactor.min.js, its getting registed at TOP, this way we have to register jquery at very top of page.
Will be better to register redactor at bottom?

Thanks

Add support to customize font-weight on WhToggleButton

Hi, I added on my fork a minor changes to permit customize of the font-weight on toggle button directly from WhToggleButton class.
In the next future could be a valid idea change this patch to permit a custom array of key-values for set every css property of the span tag.

Hereinafter link to commit:
geaaru@24db6da

Said me if could be correct merge this patch to master.

Thanks

geaaru

Field color when validation raises error

I tried to put WhDatePicker & WhRedactor in a form, but when form validation raises errors, those components don't turn red like normal text field (textFieldControlGroup). Is there a way to set them like yiistrap's control groups? I tried something like:

echo $form->labelEx($model, 'date_start');
$this->widget('yiiwheels.widgets.datepicker.WhDatePicker', array(
'model'=>$model,
'attribute'=>'date_start',
'pluginOptions'=>array(
'format'=>'mm/dd/yyyy',
),
));
echo $form->error($model, 'date_start');

but the label and widget didn't turn red when validation raised an error.

Multiple issues with TbTabs

I know that this is a Yiistrap widget, but since YiiWheels is running its own fork, I am posting this here.

Testing with simple example:

<?php $this->widget('bootstrap.widgets.TbTabs', array(
    'tabs' => array(
        array('label' => 'Billing Address',  'content' => '...', 'active' => true),
        array('label' => 'Shipping Address', 'content' => '...'),
       ),
)); ?>

Results in a Fatal error on call to TbHtml::tabbable It is defined as a protected function and should be public.

If I change TbHtml::tabbable to be a public function, then the CHtml::tag call fails with:

htmlspecialchars() expects parameter 1 to be string, array given

From the stack trace:

CHtml::tag("li", array("itemOptions" => array(), "class" => "active"), "<a data-toggle="tab" tabindex="-1" href="#tab_1">Billing Address...", true)

I am running Yiistrap 1.0.1 and Wheels 1.0.3

Submitting form with WhSelect2

I use WhSelect2 with ajax in a form and everything works fine except when I submitted the form. The real value of field was submitted but I didn't see the value in WhSelect2 dropdown.

Code:

$this->widget('yiiwheels.widgets.select2.WhSelect2', array(
   'asDropDownList'=>false,
   'model'=>$model,
   'attribute'=>'receiver_id',
   'pluginOptions'=>array(
       'ajax'=>array(
          'url'=>$this->createUrl('user/autocomplete'),
          'dataType'=>'json',
          'data'=>'js: function (term, page) {
              return {
                 name: term,
                 self: true 
              };
          }',
          'results'=>'js: function (data, page) { 
              return {results: data};
          }'
       ),
       'formatResult'=>'js: function (data) {
          return data.name;
       }',
       'formatSelection'=>'js: function (data) {
          return data.name;
       }',
   )
));

How can we display the submitted value in WhSelect2 dropdown? I have tried to set initSelection function without any luck.

yiistrap requirement out of date

Hi,
after installing YiiWheels via Composer, all links in the top navbar are not working ! This is because YiiWheels requires 2amigos/yiistrap which is a clone of crisu83/yiistrap repo. This original repo includes the fix for the navbar issue, but 2amigos/yiistrap does not.

Could you please update 2amigos/yiistrap or change composer requirements to crisu83/yiistrap ?

Fatal error: Access to undeclared static property: TbHtml::$inputs

Hi, I have gotten an error

Fatal error: Access to undeclared static property: TbHtml::$inputs in /var/www/aes/common/lib/vendor/2amigos/yiiwheels/helpers/WhHtml.php on line 45 Call Stack: 0.0002 642192 1. {main}() /var/www/aes/frontend/www/index.php:0
/var/www/aes/common/lib/vendor/yiisoft/yii/framework/web/CBaseController.php:95 0.0238 5053040 14. require('/var/www/aes/frontend/modules/userAccount/views/registration/registration.php') /var/www/aes/common/lib/vendor/yiisoft/yii/framework/web/CBaseController.php:126 0.0345 8741584 15. WhActiveForm->row() /var/www/aes/frontend/modules/userAccount/views/registration/registration.php:17 0.0353 9040864 16. WhHtml::validInputs() /var/www/aes/common/lib/vendor/2amigos/yiiwheels/widgets/form/WhActiveForm.php:123

When running this code:

beginWidget('yiiwheels.widgets.form.WhActiveForm', array( 'id'=>'verticalForm', 'htmlOptions'=>array('class'=>'well') )); ?> row('textField', $model, 'identity', array('class'=>'span3')); ?> row('passwordField', $model, 'password', array('class'=>'span3')); ?> endWidget(); ?>

I looked into TbHtml and it has no any $input static property there.

I am using yiiwheels in conjuction with yiistrap which was delivered with Yiinitializr intermediate template

RedactorJs paste issue

Now, if you are working with this widget and try to copy text in the textarea, redactor disappear and only simple textarea is presented on the page. This bug was discovered about 2-3 months, also were notes about it on russian yii forum, so now this bug is fixed (you can check that on their on-line demo), so i recommend to update redactor js in widget.

Question: What is Yiiwheels?

Hi guys,

I just stumbled about this extension.

Can you explain in a few words what this is useful for? I saw that it is somehow related to yiistrap?

Kind regards and all the best
Mikey

WhRedactor and file upload action

When I use this widget, I need upload files/images to server...

    <?php $this->widget('yiiwheels.widgets.redactor.WhRedactor', array(
        ...
        'pluginOptions' => array(
            'plugins' => array('fullscreen', 'fontsize', 'fontfamily'),
            'imageUpload' => $this->createUrl('file/upload'),
            'imageUploadErrorCallback' => new CJavaScriptExpression(
                'function(json){alert(json.error);}'
            ),
        ),
    )); ?>

How can I do this by native way?

In some extensions there is something like this:
Example of actions: https://github.com/janisto/yii-redactor/tree/master/actions

Gallery CSS file not registered

Hello,

It seems that the blueimp css file is not registered when using WhGallery widget.

The demo don't work neither.

Adding a simple registerCssFile in registerGalleryScriptFiles() solve the problem.

/**
 * Registers gallery script files
 */
public function registerGalleryScriptFiles()
{
    /* publish assets dir */
    $path      = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
    $assetsUrl = $this->getAssetsUrl($path);

    /* @var $cs CClientScript */
    $cs = Yii::app()->getClientScript();

    $cs->registerScriptFile($assetsUrl . '/js/blueimp-gallery.min.js', CClientScript::POS_END);
    $cs->registerScriptFile($assetsUrl . '/js/blueimp-gallery-indicator.js', CClientScript::POS_END);
    $cs->registerCssFile($assetsUrl . '/css/blueimp-gallery.min.css');
}

Thanks.

Clarify license

Is YiiWheels released under the BSD-3-Clause License? This is not documented anywhere. Could you confirm that this is the official license?
Thanks :)

Support for form builder

Am I right to assume that yiiwheels in its current state does not support Yii Form Builder?

-- on a side note, I could not find any reference to an IRC server / channel where the yiiwheels / yiibooster community is located...

WhRedactor plugins path error

In file WhRedactor.php in line 119 we have:

if (@file_exists($pluginsPath . $pluginName . $ds . $pluginName . '.' . $type)) { ...

In this case plugins not included, function file_exists return false...

But must be:

if (@file_exists($pluginsPath . $ds . $pluginName . $ds . $pluginName . '.' . $type)) { ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.