Initial commit

This commit is contained in:
meusinfirmary
2025-04-22 14:33:37 +07:00
commit b9891d2f81
1305 changed files with 452033 additions and 0 deletions

View File

@ -0,0 +1,17 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
root = true
[*]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[package.json]
; The indent size used in the `package.json` file cannot be changed
; https://github.com/npm/npm/pull/3180#issuecomment-16336516
indent_size = 2
indent_style = space

View File

@ -0,0 +1,22 @@
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain

View File

@ -0,0 +1,2 @@
.DS_Store
node_modules

View File

@ -0,0 +1,13 @@
{
"boss": true,
"curly": true,
"eqeqeq": true,
"eqnull": true,
"expr": true,
"immed": true,
"noarg": true,
"onevar": true,
"quotmark": "double",
"unused": true,
"node": true
}

View File

@ -0,0 +1,3 @@
language: node_js
node_js:
- 0.10

View File

@ -0,0 +1,14 @@
# Contributing
Before sending a pull request remember to follow [jQuery Core Style Guide](http://contribute.jquery.org/style-guide/js/).
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Make your changes on the `src` folder, never on the `dist` folder.
4. Commit your changes: `git commit -m 'Add some feature'`
5. Push to the branch: `git push origin my-new-feature`
6. Submit a pull request :D
#### Have you created a plugin from our boilerplate?
[Let us know!](https://github.com/jquery-boilerplate/boilerplate/wiki/Sites) Its interesting to see what features others have come up with.

View File

@ -0,0 +1,87 @@
module.exports = function(grunt) {
grunt.initConfig({
// Import package manifest
pkg: grunt.file.readJSON("timeline.jquery.json"),
// Banner definitions
meta: {
banner: "/*\n" +
" * <%= pkg.title || pkg.name %> - v<%= pkg.version %>\n" +
" * <%= pkg.description %>\n" +
" * <%= pkg.homepage %>\n" +
" *\n" +
" * Made by <%= pkg.author.name %>\n" +
" * Under <%= pkg.licenses[0].type %> License\n" +
" */\n"
},
// Concat definitions
concat: {
dist: {
src: ["src/jquery.boilerplate.js"],
dest: "dist/jquery.boilerplate.js"
},
options: {
banner: "<%= meta.banner %>"
}
},
// Lint definitions
jshint: {
files: ["src/jquery.boilerplate.js"],
options: {
jshintrc: ".jshintrc"
}
},
// Minify definitions
uglify: {
my_target: {
src: ["dist/jquery.boilerplate.js"],
dest: "dist/jquery.boilerplate.min.js"
},
options: {
banner: "<%= meta.banner %>"
}
},
less: {
files: {
'src/jquery.timeline.css': [
'src/jquery.timeline.less'
]
},
options: {
compress: false,
// LESS source maps
// To enable, set sourceMap to true and update sourceMapRootpath based on your install
sourceMap: true,
sourceMapFilename: 'src/jquery.timeline.css.map',
sourceMapRootpath: 'src/'
}
},
// watch for changes to source
// Better than calling grunt a million times
// (call 'grunt watch')
watch: {
files: ['src/*'],
tasks: ['default']
}
});
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-coffee");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-contrib-less");
grunt.registerTask("default", ["jshint", "concat", "uglify"]);
grunt.registerTask("less", ["less"]);
grunt.registerTask("travis", ["jshint"]);
};

View File

@ -0,0 +1,11 @@
### A jump-start for jQuery plugins development
First take for a pretty jquery timeline.
## License
[MIT License](http://zenorocha.mit-license.org/) © Yehia A.Salam
## Repository
https://github.com/yehiasalam/jquery.timeline

View File

@ -0,0 +1,18 @@
{
"name": "jquery-timeline",
"version": "1.0.0",
"homepage": "http://jqueryboilerplate.com",
"authors": [
"Yehia Abdel Salam <yehiasalam@live.com>"
],
"description": "A pretty vertical timeline.",
"main": "src/jquery.timeline.js",
"keywords": [
"jquery",
"plugin",
"timeline",
"jquery-plugin",
"jquery-timeline"
],
"license": "MIT"
}

View File

@ -0,0 +1,102 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jquery.timeline Demo</title>
<link rel="stylesheet" type="text/css" href="../src/jquery.timeline.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<script src="../src/jquery.timeline.js"></script>
<style type="text/css">
body {
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 14px;
line-height: 1.42857143;
color: #58666e;
background-color: #efefef;
}
</style>
<link href="http://www.jqueryscript.net/css/jquerysctipttop.css" rel="stylesheet" type="text/css">
</head>
<body><div id="jquery-script-menu">
<div class="jquery-script-center">
<ul>
<li><a href="http://www.jqueryscript.net/other/Tiny-Vertical-Timeline-Plugin-with-jQuery-jQuery-UI.html">Download This Plugin</a></li>
<li><a href="http://www.jqueryscript.net/">Back To jQueryScript.Net</a></li>
</ul>
<div class="jquery-script-ads"><script type="text/javascript"><!--
google_ad_client = "ca-pub-2783044520727903";
/* jQuery_demo */
google_ad_slot = "2780937993";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<div class="jquery-script-clear"></div>
</div>
</div>
<h1 style="margin:150px auto 30px auto;">jquery.timeline Demo</h1>
<div id="element"></div>
<div>
<a href="javascript:void(0);" id="add">Add More</a>
</div>
<script>
$(function() {
$("#element").timeline({
data: [
{time: new Date(),
color: '#555',
css: 'success',
content: 'jquery.timeline Demo Event 1'},{time: new Date(),
color: '#00ff00',
css: 'success',
content: 'jquery.timeline Demo Event 2'},{time: new Date(),
color: '#000',
css: 'success',
content: 'jquery.timeline Demo Event 3'},{time: new Date(),
color: '#000',
css: 'success',
content: 'jquery.timeline Demo Event 4'}
]
});
$("#add").click(function(){
$("#element").timeline("add",
[
{ time: new Date(),
css: 'success',
content: 'Hello Again'}
]
);
});
});
</script>
</body><script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-36251023-1']);
_gaq.push(['_setDomainName', 'jqueryscript.net']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</html>

View File

@ -0,0 +1,70 @@
/*
* jQuery Boilerplate - v3.3.4
* A jump-start for jQuery plugins development.
* http://jqueryboilerplate.com
*
* Made by Zeno Rocha
* Under MIT License
*/
// the semi-colon before function invocation is a safety net against concatenated
// scripts and/or other plugins which may not be closed properly.
;(function ( $, window, document, undefined ) {
// undefined is used here as the undefined global variable in ECMAScript 3 is
// mutable (ie. it can be changed by someone else). undefined isn't really being
// passed in so we can ensure the value of it is truly undefined. In ES5, undefined
// can no longer be modified.
// window and document are passed through as local variable rather than global
// as this (slightly) quickens the resolution process and can be more efficiently
// minified (especially when both are regularly referenced in your plugin).
// Create the defaults once
var pluginName = "defaultPluginName",
defaults = {
propertyName: "value"
};
// The actual plugin constructor
function Plugin ( element, options ) {
this.element = element;
// jQuery has an extend method which merges the contents of two or
// more objects, storing the result in the first object. The first object
// is generally empty as we don't want to alter the default options for
// future instances of the plugin
this.settings = $.extend( {}, defaults, options );
this._defaults = defaults;
this._name = pluginName;
this.init();
}
// Avoid Plugin.prototype conflicts
$.extend(Plugin.prototype, {
init: function () {
// Place initialization logic here
// You already have access to the DOM element and
// the options via the instance, e.g. this.element
// and this.settings
// you can add more functions like the one below and
// call them like so: this.yourOtherFunction(this.element, this.settings).
console.log("xD");
},
yourOtherFunction: function () {
// some logic
}
});
// A really lightweight plugin wrapper around the constructor,
// preventing against multiple instantiations
$.fn[ pluginName ] = function ( options ) {
this.each(function() {
if ( !$.data( this, "plugin_" + pluginName ) ) {
$.data( this, "plugin_" + pluginName, new Plugin( this, options ) );
}
});
// chain jQuery functions
return this;
};
})( jQuery, window, document );

View File

@ -0,0 +1,9 @@
/*
* jQuery Boilerplate - v3.3.4
* A jump-start for jQuery plugins development.
* http://jqueryboilerplate.com
*
* Made by Zeno Rocha
* Under MIT License
*/
!function(a){function b(b,e){this.element=b,this.settings=a.extend({},d,e),this._defaults=d,this._name=c,this.init()}var c="defaultPluginName",d={propertyName:"value"};a.extend(b.prototype,{init:function(){console.log("xD")},yourOtherFunction:function(){}}),a.fn[c]=function(d){return this.each(function(){a.data(this,"plugin_"+c)||a.data(this,"plugin_"+c,new b(this,d))}),this}}(jQuery,window,document);

View File

@ -0,0 +1,15 @@
{
"private": true,
"devDependencies": {
"grunt": "~0.4.5",
"grunt-cli": "~0.1.13",
"grunt-contrib-coffee": "~0.10.1",
"grunt-contrib-concat": "~0.4.0",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-uglify": "~0.4.0",
"grunt-contrib-watch": "^0.6.1"
},
"scripts": {
"test": "grunt travis --verbose"
}
}

View File

@ -0,0 +1,565 @@
/*! jQuery UI - v1.11.2 - 2015-01-30
* http://jqueryui.com
* Includes: widget.js
* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define([ "jquery" ], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
/*!
* jQuery UI Widget 1.11.2
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/jQuery.widget/
*/
var widget_uuid = 0,
widget_slice = Array.prototype.slice;
$.cleanData = (function( orig ) {
return function( elems ) {
var events, elem, i;
for ( i = 0; (elem = elems[i]) != null; i++ ) {
try {
// Only trigger remove when necessary to save time
events = $._data( elem, "events" );
if ( events && events.remove ) {
$( elem ).triggerHandler( "remove" );
}
// http://bugs.jquery.com/ticket/8235
} catch ( e ) {}
}
orig( elems );
};
})( $.cleanData );
$.widget = function( name, base, prototype ) {
var fullName, existingConstructor, constructor, basePrototype,
// proxiedPrototype allows the provided prototype to remain unmodified
// so that it can be used as a mixin for multiple widgets (#8876)
proxiedPrototype = {},
namespace = name.split( "." )[ 0 ];
name = name.split( "." )[ 1 ];
fullName = namespace + "-" + name;
if ( !prototype ) {
prototype = base;
base = $.Widget;
}
// create selector for plugin
$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
return !!$.data( elem, fullName );
};
$[ namespace ] = $[ namespace ] || {};
existingConstructor = $[ namespace ][ name ];
constructor = $[ namespace ][ name ] = function( options, element ) {
// allow instantiation without "new" keyword
if ( !this._createWidget ) {
return new constructor( options, element );
}
// allow instantiation without initializing for simple inheritance
// must use "new" keyword (the code above always passes args)
if ( arguments.length ) {
this._createWidget( options, element );
}
};
// extend with the existing constructor to carry over any static properties
$.extend( constructor, existingConstructor, {
version: prototype.version,
// copy the object used to create the prototype in case we need to
// redefine the widget later
_proto: $.extend( {}, prototype ),
// track widgets that inherit from this widget in case this widget is
// redefined after a widget inherits from it
_childConstructors: []
});
basePrototype = new base();
// we need to make the options hash a property directly on the new instance
// otherwise we'll modify the options hash on the prototype that we're
// inheriting from
basePrototype.options = $.widget.extend( {}, basePrototype.options );
$.each( prototype, function( prop, value ) {
if ( !$.isFunction( value ) ) {
proxiedPrototype[ prop ] = value;
return;
}
proxiedPrototype[ prop ] = (function() {
var _super = function() {
return base.prototype[ prop ].apply( this, arguments );
},
_superApply = function( args ) {
return base.prototype[ prop ].apply( this, args );
};
return function() {
var __super = this._super,
__superApply = this._superApply,
returnValue;
this._super = _super;
this._superApply = _superApply;
returnValue = value.apply( this, arguments );
this._super = __super;
this._superApply = __superApply;
return returnValue;
};
})();
});
constructor.prototype = $.widget.extend( basePrototype, {
// TODO: remove support for widgetEventPrefix
// always use the name + a colon as the prefix, e.g., draggable:start
// don't prefix for widgets that aren't DOM-based
widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name
}, proxiedPrototype, {
constructor: constructor,
namespace: namespace,
widgetName: name,
widgetFullName: fullName
});
// If this widget is being redefined then we need to find all widgets that
// are inheriting from it and redefine all of them so that they inherit from
// the new version of this widget. We're essentially trying to replace one
// level in the prototype chain.
if ( existingConstructor ) {
$.each( existingConstructor._childConstructors, function( i, child ) {
var childPrototype = child.prototype;
// redefine the child widget using the same prototype that was
// originally used, but inherit from the new version of the base
$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
});
// remove the list of existing child constructors from the old constructor
// so the old child constructors can be garbage collected
delete existingConstructor._childConstructors;
} else {
base._childConstructors.push( constructor );
}
$.widget.bridge( name, constructor );
return constructor;
};
$.widget.extend = function( target ) {
var input = widget_slice.call( arguments, 1 ),
inputIndex = 0,
inputLength = input.length,
key,
value;
for ( ; inputIndex < inputLength; inputIndex++ ) {
for ( key in input[ inputIndex ] ) {
value = input[ inputIndex ][ key ];
if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
// Clone objects
if ( $.isPlainObject( value ) ) {
target[ key ] = $.isPlainObject( target[ key ] ) ?
$.widget.extend( {}, target[ key ], value ) :
// Don't extend strings, arrays, etc. with objects
$.widget.extend( {}, value );
// Copy everything else by reference
} else {
target[ key ] = value;
}
}
}
}
return target;
};
$.widget.bridge = function( name, object ) {
var fullName = object.prototype.widgetFullName || name;
$.fn[ name ] = function( options ) {
var isMethodCall = typeof options === "string",
args = widget_slice.call( arguments, 1 ),
returnValue = this;
// allow multiple hashes to be passed on init
options = !isMethodCall && args.length ?
$.widget.extend.apply( null, [ options ].concat(args) ) :
options;
if ( isMethodCall ) {
this.each(function() {
var methodValue,
instance = $.data( this, fullName );
if ( options === "instance" ) {
returnValue = instance;
return false;
}
if ( !instance ) {
return $.error( "cannot call methods on " + name + " prior to initialization; " +
"attempted to call method '" + options + "'" );
}
if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
return $.error( "no such method '" + options + "' for " + name + " widget instance" );
}
methodValue = instance[ options ].apply( instance, args );
if ( methodValue !== instance && methodValue !== undefined ) {
returnValue = methodValue && methodValue.jquery ?
returnValue.pushStack( methodValue.get() ) :
methodValue;
return false;
}
});
} else {
this.each(function() {
var instance = $.data( this, fullName );
if ( instance ) {
instance.option( options || {} );
if ( instance._init ) {
instance._init();
}
} else {
$.data( this, fullName, new object( options, this ) );
}
});
}
return returnValue;
};
};
$.Widget = function( /* options, element */ ) {};
$.Widget._childConstructors = [];
$.Widget.prototype = {
widgetName: "widget",
widgetEventPrefix: "",
defaultElement: "<div>",
options: {
disabled: false,
// callbacks
create: null
},
_createWidget: function( options, element ) {
element = $( element || this.defaultElement || this )[ 0 ];
this.element = $( element );
this.uuid = widget_uuid++;
this.eventNamespace = "." + this.widgetName + this.uuid;
this.bindings = $();
this.hoverable = $();
this.focusable = $();
if ( element !== this ) {
$.data( element, this.widgetFullName, this );
this._on( true, this.element, {
remove: function( event ) {
if ( event.target === element ) {
this.destroy();
}
}
});
this.document = $( element.style ?
// element within the document
element.ownerDocument :
// element is window or document
element.document || element );
this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
}
this.options = $.widget.extend( {},
this.options,
this._getCreateOptions(),
options );
this._create();
this._trigger( "create", null, this._getCreateEventData() );
this._init();
},
_getCreateOptions: $.noop,
_getCreateEventData: $.noop,
_create: $.noop,
_init: $.noop,
destroy: function() {
this._destroy();
// we can probably remove the unbind calls in 2.0
// all event bindings should go through this._on()
this.element
.unbind( this.eventNamespace )
.removeData( this.widgetFullName )
// support: jquery <1.6.3
// http://bugs.jquery.com/ticket/9413
.removeData( $.camelCase( this.widgetFullName ) );
this.widget()
.unbind( this.eventNamespace )
.removeAttr( "aria-disabled" )
.removeClass(
this.widgetFullName + "-disabled " +
"ui-state-disabled" );
// clean up events and states
this.bindings.unbind( this.eventNamespace );
this.hoverable.removeClass( "ui-state-hover" );
this.focusable.removeClass( "ui-state-focus" );
},
_destroy: $.noop,
widget: function() {
return this.element;
},
option: function( key, value ) {
var options = key,
parts,
curOption,
i;
if ( arguments.length === 0 ) {
// don't return a reference to the internal hash
return $.widget.extend( {}, this.options );
}
if ( typeof key === "string" ) {
// handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
options = {};
parts = key.split( "." );
key = parts.shift();
if ( parts.length ) {
curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
for ( i = 0; i < parts.length - 1; i++ ) {
curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
curOption = curOption[ parts[ i ] ];
}
key = parts.pop();
if ( arguments.length === 1 ) {
return curOption[ key ] === undefined ? null : curOption[ key ];
}
curOption[ key ] = value;
} else {
if ( arguments.length === 1 ) {
return this.options[ key ] === undefined ? null : this.options[ key ];
}
options[ key ] = value;
}
}
this._setOptions( options );
return this;
},
_setOptions: function( options ) {
var key;
for ( key in options ) {
this._setOption( key, options[ key ] );
}
return this;
},
_setOption: function( key, value ) {
this.options[ key ] = value;
if ( key === "disabled" ) {
this.widget()
.toggleClass( this.widgetFullName + "-disabled", !!value );
// If the widget is becoming disabled, then nothing is interactive
if ( value ) {
this.hoverable.removeClass( "ui-state-hover" );
this.focusable.removeClass( "ui-state-focus" );
}
}
return this;
},
enable: function() {
return this._setOptions({ disabled: false });
},
disable: function() {
return this._setOptions({ disabled: true });
},
_on: function( suppressDisabledCheck, element, handlers ) {
var delegateElement,
instance = this;
// no suppressDisabledCheck flag, shuffle arguments
if ( typeof suppressDisabledCheck !== "boolean" ) {
handlers = element;
element = suppressDisabledCheck;
suppressDisabledCheck = false;
}
// no element argument, shuffle and use this.element
if ( !handlers ) {
handlers = element;
element = this.element;
delegateElement = this.widget();
} else {
element = delegateElement = $( element );
this.bindings = this.bindings.add( element );
}
$.each( handlers, function( event, handler ) {
function handlerProxy() {
// allow widgets to customize the disabled handling
// - disabled as an array instead of boolean
// - disabled class as method for disabling individual parts
if ( !suppressDisabledCheck &&
( instance.options.disabled === true ||
$( this ).hasClass( "ui-state-disabled" ) ) ) {
return;
}
return ( typeof handler === "string" ? instance[ handler ] : handler )
.apply( instance, arguments );
}
// copy the guid so direct unbinding works
if ( typeof handler !== "string" ) {
handlerProxy.guid = handler.guid =
handler.guid || handlerProxy.guid || $.guid++;
}
var match = event.match( /^([\w:-]*)\s*(.*)$/ ),
eventName = match[1] + instance.eventNamespace,
selector = match[2];
if ( selector ) {
delegateElement.delegate( selector, eventName, handlerProxy );
} else {
element.bind( eventName, handlerProxy );
}
});
},
_off: function( element, eventName ) {
eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) +
this.eventNamespace;
element.unbind( eventName ).undelegate( eventName );
// Clear the stack to avoid memory leaks (#10056)
this.bindings = $( this.bindings.not( element ).get() );
this.focusable = $( this.focusable.not( element ).get() );
this.hoverable = $( this.hoverable.not( element ).get() );
},
_delay: function( handler, delay ) {
function handlerProxy() {
return ( typeof handler === "string" ? instance[ handler ] : handler )
.apply( instance, arguments );
}
var instance = this;
return setTimeout( handlerProxy, delay || 0 );
},
_hoverable: function( element ) {
this.hoverable = this.hoverable.add( element );
this._on( element, {
mouseenter: function( event ) {
$( event.currentTarget ).addClass( "ui-state-hover" );
},
mouseleave: function( event ) {
$( event.currentTarget ).removeClass( "ui-state-hover" );
}
});
},
_focusable: function( element ) {
this.focusable = this.focusable.add( element );
this._on( element, {
focusin: function( event ) {
$( event.currentTarget ).addClass( "ui-state-focus" );
},
focusout: function( event ) {
$( event.currentTarget ).removeClass( "ui-state-focus" );
}
});
},
_trigger: function( type, event, data ) {
var prop, orig,
callback = this.options[ type ];
data = data || {};
event = $.Event( event );
event.type = ( type === this.widgetEventPrefix ?
type :
this.widgetEventPrefix + type ).toLowerCase();
// the original event may come from any element
// so we need to reset the target on the new event
event.target = this.element[ 0 ];
// copy original event properties over to the new event
orig = event.originalEvent;
if ( orig ) {
for ( prop in orig ) {
if ( !( prop in event ) ) {
event[ prop ] = orig[ prop ];
}
}
}
this.element.trigger( event, data );
return !( $.isFunction( callback ) &&
callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
event.isDefaultPrevented() );
}
};
$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
if ( typeof options === "string" ) {
options = { effect: options };
}
var hasOptions,
effectName = !options ?
method :
options === true || typeof options === "number" ?
defaultEffect :
options.effect || defaultEffect;
options = options || {};
if ( typeof options === "number" ) {
options = { duration: options };
}
hasOptions = !$.isEmptyObject( options );
options.complete = callback;
if ( options.delay ) {
element.delay( options.delay );
}
if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
element[ method ]( options );
} else if ( effectName !== method && element[ effectName ] ) {
element[ effectName ]( options.duration, options.easing, callback );
} else {
element.queue(function( next ) {
$( this )[ method ]();
if ( callback ) {
callback.call( element[ 0 ] );
}
next();
});
}
};
});
var widget = $.widget;
}));

View File

@ -0,0 +1 @@
.arrow{border-width:9px;z-index:10}.arrow,.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.arrow:after{border-width:8px;content:""}.arrow.top{left:50%;margin-left:-9px;border-top-width:0;border-bottom-color:rgba(0,0,0,0.1);top:-9px}.arrow.top:after{top:1px;margin-left:-8px;border-top-width:0;border-bottom-color:#fff}.arrow.top.arrow-primary:after{border-bottom-color:#7266ba}.arrow.top.arrow-info:after{border-bottom-color:#23b7e5}.arrow.top.arrow-success:after{border-bottom-color:#27c24c}.arrow.top.arrow-danger:after{border-bottom-color:#f05050}.arrow.top.arrow-warning:after{border-bottom-color:#fad733}.arrow.top.arrow-light:after{border-bottom-color:#edf1f2}.arrow.top.arrow-dark:after{border-bottom-color:#3a3f51}.arrow.top.arrow-black:after{border-bottom-color:#13171e}.arrow.right{top:50%;right:-9px;margin-top:-9px;border-right-width:0;border-left-color:rgba(0,0,0,0.1)}.arrow.right:after{right:1px;bottom:-8px;border-right-width:0;border-left-color:#fff}.arrow.right.arrow-primary:after{border-left-color:#7266ba}.arrow.right.arrow-info:after{border-left-color:#23b7e5}.arrow.right.arrow-success:after{border-left-color:#27c24c}.arrow.right.arrow-danger:after{border-left-color:#f05050}.arrow.right.arrow-warning:after{border-left-color:#fad733}.arrow.right.arrow-light:after{border-left-color:#edf1f2}.arrow.right.arrow-dark:after{border-left-color:#3a3f51}.arrow.right.arrow-black:after{border-left-color:#13171e}.arrow.bottom{left:50%;bottom:-9px;margin-left:-9px;border-bottom-width:0;border-top-color:rgba(0,0,0,0.1)}.arrow.bottom:after{bottom:1px;margin-left:-8px;border-bottom-width:0;border-top-color:#fff}.arrow.bottom.arrow-primary:after{border-top-color:#7266ba}.arrow.bottom.arrow-info:after{border-top-color:#23b7e5}.arrow.bottom.arrow-success:after{border-top-color:#27c24c}.arrow.bottom.arrow-danger:after{border-top-color:#f05050}.arrow.bottom.arrow-warning:after{border-top-color:#fad733}.arrow.bottom.arrow-light:after{border-top-color:#edf1f2}.arrow.bottom.arrow-dark:after{border-top-color:#3a3f51}.arrow.bottom.arrow-black:after{border-top-color:#13171e}.arrow.left{top:50%;left:-9px;margin-top:-9px;border-left-width:0;border-right-color:rgba(0,0,0,0.1)}.arrow.left:after{left:1px;bottom:-8px;border-left-width:0;border-right-color:#fff}.arrow.left.arrow-primary:after{border-right-color:#7266ba}.arrow.left.arrow-info:after{border-right-color:#23b7e5}.arrow.left.arrow-success:after{border-right-color:#27c24c}.arrow.left.arrow-danger:after{border-right-color:#f05050}.arrow.left.arrow-warning:after{border-right-color:#fad733}.arrow.left.arrow-light:after{border-right-color:#edf1f2}.arrow.left.arrow-dark:after{border-right-color:#3a3f51}.arrow.left.arrow-black:after{border-right-color:#13171e}.arrow.pull-left{left:19px}.arrow.pull-right{left:auto;right:19px}.arrow.pull-up{top:19px}.arrow.pull-down{top:auto;bottom:19px}/*# sourceMappingURL=jquery.timeline.arrow.css.map */

View File

@ -0,0 +1,263 @@
@brand-primary: #7266ba;
@brand-info: #23b7e5;
@brand-success: #27c24c;
@brand-warning: #fad733;
@brand-danger: #f05050;
@brand-light: #edf1f2;
@brand-dark: #3a3f51;
@brand-black: #13171e; //#1c2b36 ;
@arrow-width: 8px;
@arrow-color: #fff;
@arrow-outer-width: (@arrow-width + 1);
@arrow-outer-color: rgba(0,0,0,.1);
.arrow {
border-width: @arrow-outer-width;
z-index: 10;
&,
&:after {
position: absolute;
display: block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
&:after{
border-width: @arrow-width;
content: "";
}
&.top {
left: 50%;
margin-left: -@arrow-outer-width;
border-top-width: 0;
border-bottom-color: @arrow-outer-color;
top: -@arrow-outer-width;
&:after {
top: 1px;
margin-left: -@arrow-width;
border-top-width: 0;
border-bottom-color: @arrow-color;
}
&.arrow-primary{
&:after{
border-bottom-color: @brand-primary;
}
}
&.arrow-info{
&:after{
border-bottom-color: @brand-info;
}
}
&.arrow-success{
&:after{
border-bottom-color: @brand-success;
}
}
&.arrow-danger{
&:after{
border-bottom-color: @brand-danger;
}
}
&.arrow-warning{
&:after{
border-bottom-color: @brand-warning;
}
}
&.arrow-light{
&:after{
border-bottom-color: @brand-light;
}
}
&.arrow-dark{
&:after{
border-bottom-color: @brand-dark;
}
}
&.arrow-black{
&:after{
border-bottom-color: @brand-black;
}
}
}
&.right {
top: 50%;
right: -@arrow-outer-width;
margin-top: -@arrow-outer-width;
border-right-width: 0;
border-left-color: @arrow-outer-color;
&:after {
right: 1px;
bottom: -@arrow-width;
border-right-width: 0;
border-left-color: @arrow-color;
}
&.arrow-primary{
&:after{
border-left-color: @brand-primary;
}
}
&.arrow-info{
&:after{
border-left-color: @brand-info;
}
}
&.arrow-success{
&:after{
border-left-color: @brand-success;
}
}
&.arrow-danger{
&:after{
border-left-color: @brand-danger;
}
}
&.arrow-warning{
&:after{
border-left-color: @brand-warning;
}
}
&.arrow-light{
&:after{
border-left-color: @brand-light;
}
}
&.arrow-dark{
&:after{
border-left-color: @brand-dark;
}
}
&.arrow-black{
&:after{
border-left-color: @brand-black;
}
}
}
&.bottom {
left: 50%;
bottom: -@arrow-outer-width;
margin-left: -@arrow-outer-width;
border-bottom-width: 0;
border-top-color: @arrow-outer-color;
&:after {
bottom: 1px;
margin-left: -@arrow-width;
border-bottom-width: 0;
border-top-color: @arrow-color;
}
&.arrow-primary{
&:after{
border-top-color: @brand-primary;
}
}
&.arrow-info{
&:after{
border-top-color: @brand-info;
}
}
&.arrow-success{
&:after{
border-top-color: @brand-success;
}
}
&.arrow-danger{
&:after{
border-top-color: @brand-danger;
}
}
&.arrow-warning{
&:after{
border-top-color: @brand-warning;
}
}
&.arrow-light{
&:after{
border-top-color: @brand-light;
}
}
&.arrow-dark{
&:after{
border-top-color: @brand-dark;
}
}
&.arrow-black{
&:after{
border-top-color: @brand-black;
}
}
}
&.left {
top: 50%;
left: -@arrow-outer-width;
margin-top: -@arrow-outer-width;
border-left-width: 0;
border-right-color: @arrow-outer-color;
&:after {
left: 1px;
bottom: -@arrow-width;
border-left-width: 0;
border-right-color: @arrow-color;
}
&.arrow-primary{
&:after{
border-right-color: @brand-primary;
}
}
&.arrow-info{
&:after{
border-right-color: @brand-info;
}
}
&.arrow-success{
&:after{
border-right-color: @brand-success;
}
}
&.arrow-danger{
&:after{
border-right-color: @brand-danger;
}
}
&.arrow-warning{
&:after{
border-right-color: @brand-warning;
}
}
&.arrow-light{
&:after{
border-right-color: @brand-light;
}
}
&.arrow-dark{
&:after{
border-right-color: @brand-dark;
}
}
&.arrow-black{
&:after{
border-right-color: @brand-black;
}
}
}
&.pull-left{
left: @arrow-outer-width + 10;
}
&.pull-right{
left: auto;
right: @arrow-outer-width + 10;
}
&.pull-up{
top: @arrow-outer-width + 10;
}
&.pull-down{
top: auto;
bottom: @arrow-outer-width + 10;
}
}

View File

@ -0,0 +1,161 @@
.clearfix() {
&:before,
&:after {
content: " ";
display: table;
}
&:after {
clear: both;
}
}
@brand-light: #edf1f2;
@border-radius-base: 2px;
@border-color: darken(@brand-light, 5%);
@body-bg: lighten(@brand-light, 1%);
.b-a{border: 1px solid @border-color}
.padder{padding-left:15px;padding-right: 15px}
@panel-bg: #fff;
@panel-border: @border-color;
@panel-heading-border: lighten(@border-color, 5%);
@panel-list-group-border: lighten(@border-color, 5%);
@panel-border-radius: @border-radius-base;
@panel-heading-bg: lighten(@brand-light, 3%);
@panel-footer-bg: #fff;
.panel{
border-radius: @panel-border-radius;
.accordion-toggle{
font-size: 14px;
display: block;
cursor: pointer;
}
.list-group-item{
border-color: @panel-list-group-border;
}
&.no-borders{
border-width: 0;
.panel-heading,
.panel-footer{
border-width: 0;
}
}
}
.timeline{
margin: 0;
padding: 0;
}
.tl-item{
display: block;
.clearfix();
}
.visible-left{
display: none;
}
.tl-wrap{
display: block;
margin-left: 6em;
padding: 15px 0 15px 20px;
border-style: solid;
border-color: @border-color;
border-width: 0 0 0 4px;
.clearfix();
&:before{
position: relative;
content: "";
float: left;
top: 15px;
margin-left: -27px;
width: 10px;
height: 10px;
border-color: inherit;
border-width: 3px;
border-radius: 50%;
border-style: solid;
background: @brand-light;
box-shadow: 0 0 0 4px @body-bg;
}
&:hover:before{
background: transparent;
border-color: #fff;
}
}
.tl-date{
position: relative;
top: 10px;
float: left;
margin-left: -7.5em;
display: block;
width: 4.5em;
text-align: right;
}
.tl-content{
display: inline-block;
position: relative;
padding-top: 10px;
padding-bottom: 10px;
&.block{
display: block;
width: 100%;
}
&.panel{
margin-bottom: 0;
}
}
.tl-header{
display: block;
width: 12em;
text-align: center;
margin-left: 2px;
}
.timeline-center{
.tl-item{
margin-left: 50%;
.tl-wrap{
margin-left: -2px;
}
}
.tl-header{
width: auto;
margin: 0;
}
.tl-left{
margin-left: 0;
margin-right: 50%;
.hidden-left{
display: none !important;
}
.visible-left{
display: inherit;
}
.tl-wrap{
float: right;
margin-right: -2px;
border-left-width: 0;
border-right-width: 4px;
padding-left: 0;
padding-right: 20px;
&:before{
float: right;
margin-left: 0;
margin-right: -27px;
}
}
.tl-date{
float: right;
margin-left: 0;
margin-right: -8.5em;
text-align: left;
}
}
}

View File

@ -0,0 +1,325 @@
.b-a {
border: 1px solid #dee5e7;
}
.padder {
padding-left: 15px;
padding-right: 15px;
}
.panel {
border-radius: 2px;
}
.panel .accordion-toggle {
font-size: 14px;
display: block;
cursor: pointer;
}
.panel .list-group-item {
border-color: #edf1f2;
}
.panel.no-borders {
border-width: 0;
}
.panel.no-borders .panel-heading,
.panel.no-borders .panel-footer {
border-width: 0;
}
.timeline {
margin: 0;
padding: 0;
}
.tl-item {
display: block;
}
.tl-item:before,
.tl-item:after {
content: " ";
display: table;
}
.tl-item:after {
clear: both;
}
.visible-left {
display: none;
}
.tl-wrap {
display: block;
margin-left: 6em;
padding: 15px 0 15px 20px;
border-style: solid;
border-color: #dee5e7;
border-width: 0 0 0 4px;
}
.tl-wrap:before,
.tl-wrap:after {
content: " ";
display: table;
}
.tl-wrap:after {
clear: both;
}
.tl-wrap:before {
position: relative;
content: "";
float: left;
top: 15px;
margin-left: -27px;
width: 10px;
height: 10px;
border-color: inherit;
border-width: 3px;
border-radius: 50%;
border-style: solid;
background: #edf1f2;
box-shadow: 0 0 0 4px #f0f3f4;
}
.tl-wrap:hover:before {
background: transparent;
border-color: #fff;
}
.tl-date {
position: relative;
top: 10px;
float: left;
margin-left: -7.5em;
display: block;
width: 4.5em;
text-align: right;
}
.tl-content {
display: inline-block;
position: relative;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
}
.tl-content.block {
display: block;
width: 100%;
}
.tl-content.panel {
margin-bottom: 0;
}
.tl-header {
display: block;
width: 12em;
text-align: center;
margin-left: 2px;
}
.timeline-center .tl-item {
margin-left: 50%;
}
.timeline-center .tl-item .tl-wrap {
margin-left: -2px;
}
.timeline-center .tl-header {
width: auto;
margin: 0;
}
.timeline-center .tl-left {
margin-left: 0;
margin-right: 50%;
}
.timeline-center .tl-left .hidden-left {
display: none !important;
}
.timeline-center .tl-left .visible-left {
display: inherit;
}
.timeline-center .tl-left .tl-wrap {
float: right;
margin-right: -2px;
border-left-width: 0;
border-right-width: 4px;
padding-left: 0;
padding-right: 20px;
}
.timeline-center .tl-left .tl-wrap:before {
float: right;
margin-left: 0;
margin-right: -27px;
}
.timeline-center .tl-left .tl-date {
float: right;
margin-left: 0;
margin-right: -8.5em;
text-align: left;
}
.arrow {
border-width: 9px;
z-index: 10;
}
.arrow,
.arrow:after {
position: absolute;
display: block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
.arrow:after {
border-width: 8px;
content: "";
}
.arrow.top {
left: 50%;
margin-left: -9px;
border-top-width: 0;
border-bottom-color: rgba(0, 0, 0, 0.1);
top: -9px;
}
.arrow.top:after {
top: 1px;
margin-left: -8px;
border-top-width: 0;
border-bottom-color: #ffffff;
}
.arrow.top.arrow-primary:after {
border-bottom-color: #7266ba;
}
.arrow.top.arrow-info:after {
border-bottom-color: #23b7e5;
}
.arrow.top.arrow-success:after {
border-bottom-color: #27c24c;
}
.arrow.top.arrow-danger:after {
border-bottom-color: #f05050;
}
.arrow.top.arrow-warning:after {
border-bottom-color: #fad733;
}
.arrow.top.arrow-light:after {
border-bottom-color: #edf1f2;
}
.arrow.top.arrow-dark:after {
border-bottom-color: #3a3f51;
}
.arrow.top.arrow-black:after {
border-bottom-color: #13171e;
}
.arrow.right {
top: 50%;
right: -9px;
margin-top: -9px;
border-right-width: 0;
border-left-color: rgba(0, 0, 0, 0.1);
}
.arrow.right:after {
right: 1px;
bottom: -8px;
border-right-width: 0;
border-left-color: #ffffff;
}
.arrow.right.arrow-primary:after {
border-left-color: #7266ba;
}
.arrow.right.arrow-info:after {
border-left-color: #23b7e5;
}
.arrow.right.arrow-success:after {
border-left-color: #27c24c;
}
.arrow.right.arrow-danger:after {
border-left-color: #f05050;
}
.arrow.right.arrow-warning:after {
border-left-color: #fad733;
}
.arrow.right.arrow-light:after {
border-left-color: #edf1f2;
}
.arrow.right.arrow-dark:after {
border-left-color: #3a3f51;
}
.arrow.right.arrow-black:after {
border-left-color: #13171e;
}
.arrow.bottom {
left: 50%;
bottom: -9px;
margin-left: -9px;
border-bottom-width: 0;
border-top-color: rgba(0, 0, 0, 0.1);
}
.arrow.bottom:after {
bottom: 1px;
margin-left: -8px;
border-bottom-width: 0;
border-top-color: #ffffff;
}
.arrow.bottom.arrow-primary:after {
border-top-color: #7266ba;
}
.arrow.bottom.arrow-info:after {
border-top-color: #23b7e5;
}
.arrow.bottom.arrow-success:after {
border-top-color: #27c24c;
}
.arrow.bottom.arrow-danger:after {
border-top-color: #f05050;
}
.arrow.bottom.arrow-warning:after {
border-top-color: #fad733;
}
.arrow.bottom.arrow-light:after {
border-top-color: #edf1f2;
}
.arrow.bottom.arrow-dark:after {
border-top-color: #3a3f51;
}
.arrow.bottom.arrow-black:after {
border-top-color: #13171e;
}
.arrow.left {
top: 50%;
left: -9px;
margin-top: -9px;
border-left-width: 0;
border-right-color: rgba(0, 0, 0, 0.1);
}
.arrow.left:after {
left: 1px;
bottom: -8px;
border-left-width: 0;
border-right-color: #ffffff;
}
.arrow.left.arrow-primary:after {
border-right-color: #7266ba;
}
.arrow.left.arrow-info:after {
border-right-color: #23b7e5;
}
.arrow.left.arrow-success:after {
border-right-color: #27c24c;
}
.arrow.left.arrow-danger:after {
border-right-color: #f05050;
}
.arrow.left.arrow-warning:after {
border-right-color: #fad733;
}
.arrow.left.arrow-light:after {
border-right-color: #edf1f2;
}
.arrow.left.arrow-dark:after {
border-right-color: #3a3f51;
}
.arrow.left.arrow-black:after {
border-right-color: #13171e;
}
.arrow.pull-left {
left: 19px;
}
.arrow.pull-right {
left: auto;
right: 19px;
}
.arrow.pull-up {
top: 19px;
}
.arrow.pull-down {
top: auto;
bottom: 19px;
}

View File

@ -0,0 +1 @@
{"version":3,"sources":["jquery.timeline.core.less","jquery.timeline.arrow.less"],"names":[],"mappings":"AAgBA,UACC,QAAA,CACA,UAED,SACC,cApBC,QAAC,QACD,QAAC,OACC,QAAS,GAAT,CACA,cAEF,QAAC,OACC,WAiBJ,cACC,aAED,SACC,aAAA,CACA,eAAA,CACA,wBAAA,CACA,kBAAA,CACA,oBAAA,CACA,uBAhCC,QAAC,QACD,QAAC,OACC,QAAS,GAAT,CACA,cAEF,QAAC,OACC,WA4BH,QAAC,QACA,iBAAA,CACA,QAAS,EAAT,CACA,UAAA,CACA,QAAA,CACA,iBAAA,CACA,UAAA,CACA,WAAA,CACA,oBAAA,CACA,gBAAA,CACA,iBAAA,CACA,kBAAA,CACA,kBAAA,CACA,6BAED,QAAC,MAAM,QACN,sBAAA,CACA,kBAIF,SACC,iBAAA,CACA,QAAA,CACA,UAAA,CACA,kBAAA,CACA,aAAA,CACA,WAAA,CACA,iBAGD,YACC,oBAAA,CACA,iBAAA,CACA,gBAAA,CACA,oBACA,WAAC,OACA,aAAA,CACA,WAED,WAAC,OACA,gBAIF,WACC,aAAA,CACA,UAAA,CACA,iBAAA,CACA,gBAGD,gBACC,UACC,gBAFF,gBACC,SAEC,UACC,iBAJH,gBAOC,YACC,UAAA,CACA,SATF,gBAWC,UACC,aAAA,CACA,iBAbF,gBAWC,SAGC,cACC,YAAA,YAfH,gBAWC,SAMC,eACC,gBAlBH,gBAWC,SASC,UACC,WAAA,CACA,iBAAA,CACA,mBAAA,CACA,sBAAA,CACA,cAAA,CACA,mBACA,gBAhBF,SASC,SAOE,QACA,WAAA,CACA,aAAA,CACA,mBA9BJ,gBAWC,SAsBC,UACC,WAAA,CACA,aAAA,CACA,mBAAA,CACA,gBC9GH,OACE,gBAAA,CACA,WACA,OACA,MAAC,OACC,iBAAA,CACA,aAAA,CACA,OAAA,CACA,QAAA,CACA,wBAAA,CACA,mBAEF,MAAC,OACA,gBAAA,CACA,QAAS,GAGV,MAAC,KACC,QAAA,CACA,gBAAA,CACA,kBAAA,CACA,mCAAA,CACA,SACA,MAND,IAME,OACC,OAAA,CACA,gBAAA,CACA,kBAAA,CACA,yBAGA,MAbH,IAYE,cACE,OACC,4BAIF,MAlBH,IAiBE,WACE,OACC,4BAIF,MAvBH,IAsBE,cACE,OACC,4BAIF,MA5BH,IA2BE,aACE,OACC,4BAIF,MAjCH,IAgCE,cACE,OACC,4BAIF,MAtCH,IAqCE,YACE,OACC,4BAIF,MA3CH,IA0CE,WACE,OACC,4BAIF,MAhDH,IA+CE,YACE,OACC,4BAKN,MAAC,OACA,OAAA,CACC,UAAA,CACA,eAAA,CACA,oBAAA,CACA,kCACA,MAND,MAME,OACC,SAAA,CACA,WAAA,CACA,oBAAA,CACA,uBAGA,MAbH,MAYE,cACE,OACC,0BAIF,MAlBH,MAiBE,WACE,OACC,0BAIF,MAvBH,MAsBE,cACE,OACC,0BAIF,MA5BH,MA2BE,aACE,OACC,0BAIF,MAjCH,MAgCE,cACE,OACC,0BAIF,MAtCH,MAqCE,YACE,OACC,0BAIF,MA3CH,MA0CE,WACE,OACC,0BAIF,MAhDH,MA+CE,YACE,OACC,0BAKN,MAAC,QACC,QAAA,CACA,WAAA,CACA,gBAAA,CACA,qBAAA,CACA,iCACA,MAND,OAME,OACC,UAAA,CACA,gBAAA,CACA,qBAAA,CACA,sBAGA,MAbH,OAYE,cACE,OACC,yBAIF,MAlBH,OAiBE,WACE,OACC,yBAIF,MAvBH,OAsBE,cACE,OACC,yBAIF,MA5BH,OA2BE,aACE,OACC,yBAIF,MAjCH,OAgCE,cACE,OACC,yBAIF,MAtCH,OAqCE,YACE,OACC,yBAIF,MA3CH,OA0CE,WACE,OACC,yBAIF,MAhDH,OA+CE,YACE,OACC,yBAKN,MAAC,MACA,OAAA,CACC,SAAA,CACA,eAAA,CACA,mBAAA,CACA,mCACA,MAND,KAME,OACC,QAAA,CACA,WAAA,CACA,mBAAA,CACA,wBAGA,MAbH,KAYE,cACE,OACC,2BAIF,MAlBH,KAiBE,WACE,OACC,2BAIF,MAvBH,KAsBE,cACE,OACC,2BAIF,MA5BH,KA2BE,aACE,OACC,2BAIF,MAjCH,KAgCE,cACE,OACC,2BAIF,MAtCH,KAqCE,YACE,OACC,2BAIF,MA3CH,KA0CE,WACE,OACC,2BAIF,MAhDH,KA+CE,YACE,OACC,2BAKN,MAAC,WACC,UAEF,MAAC,YACC,SAAA,CACA,WAEF,MAAC,SACC,SAEF,MAAC,WACC,QAAA,CACA","file":"jquery.timeline.css"}

View File

@ -0,0 +1,167 @@
/*!
* jQuery UI Widget-factory plugin boilerplate (for 1.8/9+)
* Author: @addyosmani
* Further changes: @peolanha
* Licensed under the MIT license
*/
;(function ( $, window, document, undefined ) {
// define your widget under a namespace of your choice
// with additional parameters e.g.
// $.widget( "namespace.widgetname", (optional) - an
// existing widget prototype to inherit from, an object
// literal to become the widget's prototype );
$.widget( "grantorino.timeline" , {
//Options to be used as defaults
options: {
someValue: null
},
_tpl_event: ['<li class="tl-item">',
'<div class="tl-wrap {{class}}">',
'<span class="tl-date">{{time}}</span>',
'<div class="tl-content panel padder b-a">',
'<span class="arrow left pull-up"></span>',
'<div>{{content}}</div>',
'</div>',
'</div>',
'</li>'
].join('\n'),
//Setup widget (eg. element creation, apply theming
// , bind events etc.)
_create: function () {
// _create will automatically run the first time
// this widget is called. Put the initial widget
// setup code here, then you can access the element
// on which the widget was called via this.element.
// The options defined above can be accessed
// via this.options this.element.addStuff();
//
//
this._buildContainer();
this._buildTimeline();
},
// Destroy an instantiated plugin and clean up
// modifications the widget has made to the DOM
destroy: function () {
// this.element.removeStuff();
// For UI 1.8, destroy must be invoked from the
// base widget
$.Widget.prototype.destroy.call(this);
// For UI 1.9, define _destroy instead and don't
// worry about
// calling the base widget
},
add: function ( event_data ) {
//_trigger dispatches callbacks the plugin user
// can subscribe to
// signature: _trigger( "callbackName" , [eventObject],
// [uiObject] )
// eg. this._trigger( "hover", e /*where e.type ==
// "mouseenter"*/, { hovered: $(e.target)});
//
if ($.isArray( event_data )){
var that = this;
$.each(event_data, function( index, tl_event ) {
that.add(tl_event);
});
} else {
this.element.find("ul.timeline").append(
this._render_event(event_data)
);
}
},
methodA: function ( event ) {
this._trigger("dataChanged", event, {
key: "someValue"
});
},
_render_event: function(data){
var event_html = this._tpl_event.replace('{{time}}', this._format_time(data.time) );
event_html = event_html.replace('{{content}}', data.content);
event_html.replace('{{class}}', data.css);
return event_html;
},
_format_time: function(time){
var now = moment(time);
var years = now.format('YYYY');
var months = now.format('MMM');
var days = now.format('DD');
var hours = Number(now.format('HH'));
var minutes = Number(now.format('mm'));
var ampm = hours >= 12 ? 'pm' : 'am';
hours = hours % 12;
hours = hours ? hours : 12; // the hour '0' should be '12'
minutes = minutes < 10 ? '0'+minutes : minutes;
return ( months + ' ' + days + ' ' + hours + ':' + minutes + ' ' + ampm);
},
_format_time_01: function(time){
var hours = time.getHours();
var minutes = time.getMinutes();
var ampm = hours >= 12 ? 'pm' : 'am';
hours = hours % 12;
hours = hours ? hours : 12; // the hour '0' should be '12'
minutes = minutes < 10 ? '0'+minutes : minutes;
return ( hours + ':' + minutes + ' ' + ampm);
},
_buildTimeline: function () {
var that = this;
$.each(this.options.data, function( index, tl_event ) {
that.element.find("ul.timeline").append(that._render_event(tl_event));
});
},
_buildContainer: function(){
this.element.append('<ul class="timeline"></ul>');
},
// Respond to any changes the user makes to the
// option method
_setOption: function ( key, value ) {
switch (key) {
case "someValue":
//this.options.someValue = doSomethingWith( value );
break;
default:
//this.options[ key ] = value;
break;
}
// For UI 1.8, _setOption must be manually invoked
// from the base widget
$.Widget.prototype._setOption.apply( this, arguments );
// For UI 1.9 the _super method can be used instead
// this._super( "_setOption", key, value );
}
});
})( jQuery, window, document );

View File

@ -0,0 +1,2 @@
@import "jquery.timeline.core.less";
@import "jquery.timeline.arrow.less";

View File

@ -0,0 +1,46 @@
{
"name": "boilerplate",
"title": "jQuery Boilerplate",
"description": "A jump-start for jQuery plugins development.",
"keywords": [
"jquery",
"boilerplate",
"plugins"
],
"version": "3.4.0",
"author": {
"name": "Zeno Rocha",
"email": "zno.rocha@gmail.com",
"url": "https://github.com/zenorocha"
},
"maintainers": [
{
"name": "Zeno Rocha",
"email": "zno.rocha@gmail.com",
"url": "https://github.com/zenorocha"
},
{
"name": "Addy Osmani",
"email": "addyosmani@gmail.com",
"url": "https://github.com/addyosmani"
},
{
"name": "Helder Santana",
"email": "heldr@me.com",
"url": "https://github.com/heldr"
}
],
"licenses": [
{
"type": "MIT",
"url": "http://zenorocha.mit-license.org/"
}
],
"bugs": "https://github.com/jquery-boilerplate/boilerplate/issues",
"homepage": "http://jqueryboilerplate.com",
"docs": "https://github.com/jquery-boilerplate/boilerplate#readme",
"download": "https://github.com/jquery-boilerplate/boilerplate/archive/master.zip",
"dependencies": {
"jquery": ">=1.4"
}
}