Skip to content

Commit

Permalink
Update JS to 1.04 and ordered after Bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
cinghie committed Jul 7, 2015
1 parent f3b7ac2 commit 049ff49
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 6 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,19 @@ Theme Options
<li>All the themes you can use are in the assets/css folder</li>
</ul>

Changelog
-----------------

<ul>
<li>Version 1.2.0 - Update JS to 1.04 and ordered after Bootstrap</li>
<li>Version 1.1.2 - Fixing error to extends yii Widget problem</li>
<li>Version 1.1.1 - Added link null option</li>
<li>Version 1.1.0 - Added Message & Dismiss Value</li>
<li>Version 1.0.1 - Updated README</li>
<li>Version 1.0.0 - Initial Release</li>
</ul>

Libraries Included
-----------------

https://github.com/silktide/cookieconsent2 (Version 1.0.3)
https://github.com/silktide/cookieconsent2 (Version 1.0.4)
17 changes: 16 additions & 1 deletion assets/CookieAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @github https://github.com/cinghie/yii2-cookie-consent
* @license GNU GENERAL PUBLIC LICENSE VERSION 3
* @package yii2-cookie-consent
* @version 1.0
* @version 1.2.0
*/

namespace cinghie\cookieconsent\assets;
Expand All @@ -16,10 +16,25 @@

class CookieAsset extends AssetBundle
{
/**
* @inherit
*/
public $sourcePath = __DIR__;

/**
* @inherit
*/
public $js=[
'js/cookieconsent.js',
];

/**
* @inherit
*/
public $depends = [
'yii\web\YiiAsset',
'yii\bootstrap\BootstrapAsset',
'yii\bootstrap\BootstrapPluginAsset',
];

}
5 changes: 3 additions & 2 deletions assets/js/cookieconsent.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@
},

dismiss: function (evt) {
evt.preventDefault();
evt.preventDefault && evt.preventDefault();
evt.returnValue = false;
this.setDismissedCookie();
this.container.removeChild(this.element);
},
Expand All @@ -325,7 +326,7 @@
if (!initialized && document.readyState == 'complete') {
cookieconsent.init();
initialized = true;
window[OPTIONS_UPDATER] = cookieconsent.setOptionsOnTheFly.bind(cookieconsent);
window[OPTIONS_UPDATER] = Util.bind(cookieconsent.setOptionsOnTheFly, cookieconsent);
}
})();

Expand Down
2 changes: 1 addition & 1 deletion widgets/CookieWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @github https://github.com/cinghie/yii2-cookie-consent
* @license GNU GENERAL PUBLIC LICENSE VERSION 3
* @package yii2-cookie-consent
* @version 1.0
* @version 1.2.0
*/

namespace cinghie\cookieconsent\widgets;
Expand Down
2 changes: 1 addition & 1 deletion widgets/views/cookieWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @github https://github.com/cinghie/yii2-cookie-consent
* @license GNU GENERAL PUBLIC LICENSE VERSION 3
* @package yii2-cookie-consent
* @version 1.0
* @version 1.2.0
*/

use cinghie\cookieconsent\assets\CookieAsset;
Expand Down

0 comments on commit 049ff49

Please sign in to comment.