2017 © Pedro Peláez
 

yii2-extension yii2-submit-spinner

Adds a div overlay with a spinning loader on submit

image

c006/yii2-submit-spinner

Adds a div overlay with a spinning loader on submit

  • Wednesday, September 20, 2017
  • by c006
  • Repository
  • 2 Watchers
  • 6 Stars
  • 1,109 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 0 Open issues
  • 8 Versions
  • 1 % Grown

The README.md

Yii2 Submit Spinner

Current version 1.1.0, (*1)

  • New add-on, form_validate

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-source "c006/yii2-submit-spinner" "dev-master", (*4)

or add, (*5)

"c006/yii2-submit-spinner": "dev-master", (*6)

to the require section of your composer.json file., (*7)

Required

  • jQuery, (*8)

  • yii \ widgets \ ActiveForm, (*9)

Options

class_id => {string}
The ID of the container. default: "SubmitSpinner", (*10)

form_id => {string}
The ID of the form, (*11)

bg_color => {string}
Color of the overlay, (*12)

bg_opacity => {float}
Opacity of the overlay, (*13)

spin_speed => {int}
How many seconds a for a complete 360 rotation, (*14)

radius => {int}
Pixel radius/width of the spinner, (*15)

bg_spinner_opacity => {float}
Opacity of main spinner, (*16)

bg_spinner_color => {string}
Color of main spinner, (*17)

sections => {int}
How many dots or circles, (*18)

section_size => {int}
Dot/circle size in px, (*19)

section_color => {string}
Color of dots/circles, (*20)

section_offset => {int}
How far from the center in px, (*21)

section_opacity_base => {float}
Minimum opacity e.g. 0.25, (*22)

proportionate_increase => {boolean}
Will increase/decrease dots proportionally to the main spinner, (*23)

form_validate => {boolean}
Will trigger on successful ActiveForm validation, (*24)

Demo

Demo: http://demo.c006.us, (*25)

Usage

Added javascript functions, (*26)

  • show_submit_spinner(), (*27)

  • hide_submit_spinner(), (*28)

Once the extension is installed, simply use it in your code by :, (*29)

Defaults option:, (*30)

> = \c006\spinner\SubmitSpinner::widget(); ?>, (*31)

All options: (using defaults), (*32)

> = c006\spinner\SubmitSpinner::widget( [ 'form_id' => $form->id, 'bg_color' => '#444444', 'bg_opacity' => 0.8, 'spin_speed' => 4, 'radius' => 200, 'bg_spinner_opacity' => 0.5, 'bg_spinner_color' => '#000000', 'sections' => 15, 'section_size' => 20, 'section_color' => '#FFFFFF', 'section_offset' => 80, 'section_opacity_base' => .2, 'proportionate_increase' => 1, ] ) ?>, (*33)

All options: (5 large dots only, no background spinner), (*34)

> = c006\spinner\SubmitSpinner::widget( [ 'form_id' => $form->id, 'bg_color' => '#333333', 'bg_opacity' => 0.8, 'spin_speed' => 4, 'radius' => 250, 'bg_spinner_opacity' => 0.0, 'bg_spinner_color' => '#000000', 'sections' => 5, 'section_size' => 80, 'section_color' => '#FFFFFF', 'section_offset' => 80, 'section_opacity_base' => .2, 'proportionate_increase' => 0, ] ) ?>, (*35)

Comments / Suggestions

Please provide any helpful feedback or requests., (*36)

Thanks., (*37)

The Versions

20/09 2017

v2.0

2.0.0.0

Adds a div overlay with a spinning loader on submit

  Sources   Download

MIT

by Jon Chambers

extension yii2 form widgets

06/10 2016

dev-develop

dev-develop

Adds a div overlay with a spinning loader on submit

  Sources   Download

MIT

by Jon Chambers

extension yii2 form widgets

06/10 2016

v1.3

1.3.0.0

Adds a div overlay with a spinning loader on submit

  Sources   Download

MIT

by Jon Chambers

extension yii2 form widgets

13/08 2016

dev-master

9999999-dev

Adds a div overlay with a spinning loader on submit

  Sources   Download

MIT

by Jon Chambers

extension yii2 form widgets

23/07 2016

v1.2

1.2.0.0

Adds a div overlay with a spinning loader on submit

  Sources   Download

MIT

by Jon Chambers

extension yii2 form widgets

10/12 2015

1.1.x-dev

1.1.9999999.9999999-dev

Adds a div overlay with a spinning loader on submit

  Sources   Download

MIT

by Jon Chambers

extension yii2 form widgets

10/12 2015

v1.1.0

1.1.0.0

Adds a div overlay with a spinning loader on submit

  Sources   Download

MIT

by Jon Chambers

extension yii2 form widgets

15/09 2015

v1.0.0

1.0.0.0

Adds a div overlay with a spinning loader on submit

  Sources   Download

MIT

by Jon Chambers

extension yii2 form widgets