1
0
Fork 0
mirror of https://github.com/janickiy/yii2-nomer synced 2025-03-09 15:39:59 +00:00

add files to project

This commit is contained in:
janickiy 2020-02-05 06:34:26 +03:00
commit 5cac498444
3729 changed files with 836998 additions and 0 deletions

View file

@ -0,0 +1,82 @@
# jquery.cookieBar
A simple, lightweight jQuery plugin for creating a notification bar that is dismissable and dismiss is saved by cookie. Perfect for implementing the new eu cookielaw! - example available on [gh-pages] (http://carlwoodhouse.github.com/jquery.cookieBar)
Uses: [jQuery.Cookie](https://github.com/carhartl/jquery-cookie) - bundled, no need to reference.
## Installation
Include script *after* the jQuery library
<script src="/path/jquery.cookieBar.js"></script>
If you want the default styles also include the css, if not feel free to style it as you see wish!
<link rel="stylesheet" type="text/css" href="cookieBar.css">
## Usage
Create a cookiebar with no markup whatsoever! it's like magic ...
<script type="text/javascript">
$(document).ready(function() {
$.cookieBar();
});
</script>
Or, create your cookiebar markup from a simple container, example:
<script type="text/javascript">
$(document).ready(function() {
$('.cookie-message').cookieBar();
});
</script>
<div class="cookie-message">
The government says i have to tell you i use cookies, so here it is
</div>
Or, create your cookiebar markup from a simple container with an advanced button, example:
<script type="text/javascript">
$(document).ready(function() {
$('.cookie-message').cookieBar({ closeButton : '.my-close-button' });
});
</script>
<div class="cookie-message">
The government says i have to tell you i use cookies, so here it is <a class="my-close-button" href>cheers!</a>
</div>
Full Example
Check out example.html in the repository or visit our [github-page] (http://carlwoodhouse.github.com/jquery.cookieBar)
## Options
**closeButton** - Define a close button for the bar
closeButton: 'none'
*Default: a close button will be added automagically*
**secure** - Define if the cookie transmission requires secure protocal (https)
secure: true
*Default: false*
**path** - Define the path the cookie is valid for
path: '/path/for/cookie'
*Default: '/' (site wide)*
**domain** - Define the domain the cookie operates on
domain: 'domain.com'
*Default: domain cookie was created on*
## Authors
* [Carl Woodhouse](https://github.com/carlwoodhouse)
* [Craig Hamnett](https://github.com/craighamnett)

View file

@ -0,0 +1,22 @@
/*!
* jQuery Cookiebar Plugin
* https://github.com/carlwoodhouse/jquery.cookieBar
*
* Copyright 2012, Carl Woodhouse
* Disclaimer: if you still get fined for not complying with the eu cookielaw, it's not our fault.
*/
!function(a){a.fn.cookieBar=function(b){var c=a.extend({closeButton:"none",secure:!1,path:"/",domain:""},b);return this.each(function(){var d=a(this);d.hide(),"none"==c.closeButton&&(d.append('<a class="cookiebar-close">Continue</a>'),c=a.extend({closeButton:".cookiebar-close"},b)),"hide"!=a.cookie("cookiebar")&&d.show(),d.find(c.closeButton).click(function(){return d.hide(),a.cookie("cookiebar","hide",{path:c.path,secure:c.secure,domain:c.domain,expires:30}),!1})})},a.cookieBar=function(b){a("body").prepend('<div class="ui-widget"><div style="display: none;" class="cookie-message ui-widget-header blue"><p>By using this website you allow us to place cookies on your computer. They are harmless and never personally identify you.</p></div></div>'),a(".cookie-message").cookieBar(b)}}(jQuery),
/*!
* Dependancy:
* jQuery Cookie Plugin
* https://github.com/carhartl/jquery-cookie
*
* Copyright 2011, Klaus Hartl
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/GPL-2.0
*/
function(a){a.cookie=function(b,c,d){if(arguments.length>1&&(!/Object/.test(Object.prototype.toString.call(c))||null===c||void 0===c)){if(d=a.extend({},d),(null===c||void 0===c)&&(d.expires=-1),"number"==typeof d.expires){var e=d.expires,f=d.expires=new Date;f.setDate(f.getDate()+e)}return c=String(c),document.cookie=[encodeURIComponent(b),"=",d.raw?c:encodeURIComponent(c),d.expires?"; expires="+d.expires.toUTCString():"",d.path?"; path="+d.path:"",d.domain?"; domain="+d.domain:"",d.secure?"; secure":""].join("")}d=c||{};for(var g,h=d.raw?function(a){return a}:decodeURIComponent,i=document.cookie.split("; "),j=0;g=i[j]&&i[j].split("=");j++)if(h(g[0])===b)return h(g[1]||"");return null}}(jQuery);

View file

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2016 Carl Woodhouse
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.