신수용

changed directory name

Showing 455 changed files with 0 additions and 3331 deletions
var path = require('path');
module.exports = {
includePaths: [
path.join(__dirname, 'app/assets/stylesheets')
]
};
// Fixed Width Icons
// -------------------------
.@{fa-css-prefix}-fw {
width: (18em / 14);
text-align: center;
}
// Fixed Width Icons
// -------------------------
.#{$fa-css-prefix}-fw {
width: (18em / 14);
text-align: center;
}
// Mixins
// --------------------------
@mixin fa-icon() {
display: inline-block;
font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration
font-size: inherit; // can't have font-size inherit on line above, so need to override
text-rendering: auto; // optimizelegibility throws things off #1094
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@mixin fa-icon-rotate($degrees, $rotation) {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation});
-webkit-transform: rotate($degrees);
-ms-transform: rotate($degrees);
transform: rotate($degrees);
}
@mixin fa-icon-flip($horiz, $vert, $rotation) {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation});
-webkit-transform: scale($horiz, $vert);
-ms-transform: scale($horiz, $vert);
transform: scale($horiz, $vert);
}
{
"name": "jquery",
"version": "2.1.4",
"main": "dist/jquery.js",
"license": "MIT",
"ignore": [
"**/.*",
"build",
"dist/cdn",
"speed",
"test",
"*.md",
"AUTHORS.txt",
"Gruntfile.js",
"package.json"
],
"devDependencies": {
"sizzle": "2.1.1-jquery.2.1.2",
"requirejs": "2.1.10",
"qunit": "1.14.0",
"sinon": "1.8.1"
},
"keywords": [
"jquery",
"javascript",
"library"
],
"homepage": "https://github.com/jquery/jquery",
"_release": "2.1.4",
"_resolution": {
"type": "version",
"tag": "2.1.4",
"commit": "7751e69b615c6eca6f783a81e292a55725af6b85"
},
"_source": "git://github.com/jquery/jquery.git",
"_target": ">= 1.9.1",
"_originalSource": "jquery"
}
\ No newline at end of file
Copyright 2014 jQuery Foundation and other contributors
http://jquery.com/
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.
define([
"../core",
"../core/parseHTML",
"../ajax",
"../traversing",
"../manipulation",
"../selector",
// Optional event/alias dependency
"../event/alias"
], function( jQuery ) {
// Keep a copy of the old load method
var _load = jQuery.fn.load;
/**
* Load a url into a page
*/
jQuery.fn.load = function( url, params, callback ) {
if ( typeof url !== "string" && _load ) {
return _load.apply( this, arguments );
}
var selector, type, response,
self = this,
off = url.indexOf(" ");
if ( off >= 0 ) {
selector = jQuery.trim( url.slice( off ) );
url = url.slice( 0, off );
}
// If it's a function
if ( jQuery.isFunction( params ) ) {
// We assume that it's the callback
callback = params;
params = undefined;
// Otherwise, build a param string
} else if ( params && typeof params === "object" ) {
type = "POST";
}
// If we have elements to modify, make the request
if ( self.length > 0 ) {
jQuery.ajax({
url: url,
// if "type" variable is undefined, then "GET" method will be used
type: type,
dataType: "html",
data: params
}).done(function( responseText ) {
// Save response for use in complete callback
response = arguments;
self.html( selector ?
// If a selector was specified, locate the right elements in a dummy div
// Exclude scripts to avoid IE 'Permission Denied' errors
jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
// Otherwise use the full result
responseText );
}).complete( callback && function( jqXHR, status ) {
self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
});
}
return this;
};
});
define([
"../core",
"../ajax"
], function( jQuery ) {
// Install script dataType
jQuery.ajaxSetup({
accepts: {
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
},
contents: {
script: /(?:java|ecma)script/
},
converters: {
"text script": function( text ) {
jQuery.globalEval( text );
return text;
}
}
});
// Handle cache's special case and crossDomain
jQuery.ajaxPrefilter( "script", function( s ) {
if ( s.cache === undefined ) {
s.cache = false;
}
if ( s.crossDomain ) {
s.type = "GET";
}
});
// Bind script tag hack transport
jQuery.ajaxTransport( "script", function( s ) {
// This transport only deals with cross domain requests
if ( s.crossDomain ) {
var script, callback;
return {
send: function( _, complete ) {
script = jQuery("<script>").prop({
async: true,
charset: s.scriptCharset,
src: s.url
}).on(
"load error",
callback = function( evt ) {
script.remove();
callback = null;
if ( evt ) {
complete( evt.type === "error" ? 404 : 200, evt.type );
}
}
);
document.head.appendChild( script[ 0 ] );
},
abort: function() {
if ( callback ) {
callback();
}
}
};
}
});
});
define([
"../../core"
], function( jQuery ) {
return jQuery.now();
});
define([
"../core",
"../core/access",
"./support"
], function( jQuery, access, support ) {
var rfocusable = /^(?:input|select|textarea|button)$/i;
jQuery.fn.extend({
prop: function( name, value ) {
return access( this, jQuery.prop, name, value, arguments.length > 1 );
},
removeProp: function( name ) {
return this.each(function() {
delete this[ jQuery.propFix[ name ] || name ];
});
}
});
jQuery.extend({
propFix: {
"for": "htmlFor",
"class": "className"
},
prop: function( elem, name, value ) {
var ret, hooks, notxml,
nType = elem.nodeType;
// Don't get/set properties on text, comment and attribute nodes
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
return;
}
notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
if ( notxml ) {
// Fix name and attach hooks
name = jQuery.propFix[ name ] || name;
hooks = jQuery.propHooks[ name ];
}
if ( value !== undefined ) {
return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
ret :
( elem[ name ] = value );
} else {
return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
ret :
elem[ name ];
}
},
propHooks: {
tabIndex: {
get: function( elem ) {
return elem.hasAttribute( "tabindex" ) || rfocusable.test( elem.nodeName ) || elem.href ?
elem.tabIndex :
-1;
}
}
}
});
if ( !support.optSelected ) {
jQuery.propHooks.selected = {
get: function( elem ) {
var parent = elem.parentNode;
if ( parent && parent.parentNode ) {
parent.parentNode.selectedIndex;
}
return null;
}
};
}
jQuery.each([
"tabIndex",
"readOnly",
"maxLength",
"cellSpacing",
"cellPadding",
"rowSpan",
"colSpan",
"useMap",
"frameBorder",
"contentEditable"
], function() {
jQuery.propFix[ this.toLowerCase() ] = this;
});
});
define([
"../var/support"
], function( support ) {
(function() {
var input = document.createElement( "input" ),
select = document.createElement( "select" ),
opt = select.appendChild( document.createElement( "option" ) );
input.type = "checkbox";
// Support: iOS<=5.1, Android<=4.2+
// Default value for a checkbox should be "on"
support.checkOn = input.value !== "";
// Support: IE<=11+
// Must access selectedIndex to make default options select
support.optSelected = opt.selected;
// Support: Android<=2.3
// Options inside disabled selects are incorrectly marked as disabled
select.disabled = true;
support.optDisabled = !opt.disabled;
// Support: IE<=11+
// An input loses its value after becoming a radio
input = document.createElement( "input" );
input.value = "t";
input.type = "radio";
support.radioValue = input.value === "t";
})();
return support;
});
define([
"../core"
], function( jQuery ) {
// Multifunctional method to get and set values of a collection
// The value/s can optionally be executed if it's a function
var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
var i = 0,
len = elems.length,
bulk = key == null;
// Sets many values
if ( jQuery.type( key ) === "object" ) {
chainable = true;
for ( i in key ) {
jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
}
// Sets one value
} else if ( value !== undefined ) {
chainable = true;
if ( !jQuery.isFunction( value ) ) {
raw = true;
}
if ( bulk ) {
// Bulk operations run against the entire set
if ( raw ) {
fn.call( elems, value );
fn = null;
// ...except when executing function values
} else {
bulk = fn;
fn = function( elem, key, value ) {
return bulk.call( jQuery( elem ), value );
};
}
}
if ( fn ) {
for ( ; i < len; i++ ) {
fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
}
}
}
return chainable ?
elems :
// Gets
bulk ?
fn.call( elems ) :
len ? fn( elems[0], key ) : emptyGet;
};
return access;
});
// Initialize a jQuery object
define([
"../core",
"./var/rsingleTag",
"../traversing/findFilter"
], function( jQuery, rsingleTag ) {
// A central reference to the root jQuery(document)
var rootjQuery,
// A simple way to check for HTML strings
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
// Strict HTML recognition (#11290: must start with <)
rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
init = jQuery.fn.init = function( selector, context ) {
var match, elem;
// HANDLE: $(""), $(null), $(undefined), $(false)
if ( !selector ) {
return this;
}
// Handle HTML strings
if ( typeof selector === "string" ) {
if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) {
// Assume that strings that start and end with <> are HTML and skip the regex check
match = [ null, selector, null ];
} else {
match = rquickExpr.exec( selector );
}
// Match html or make sure no context is specified for #id
if ( match && (match[1] || !context) ) {
// HANDLE: $(html) -> $(array)
if ( match[1] ) {
context = context instanceof jQuery ? context[0] : context;
// Option to run scripts is true for back-compat
// Intentionally let the error be thrown if parseHTML is not present
jQuery.merge( this, jQuery.parseHTML(
match[1],
context && context.nodeType ? context.ownerDocument || context : document,
true
) );
// HANDLE: $(html, props)
if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
for ( match in context ) {
// Properties of context are called as methods if possible
if ( jQuery.isFunction( this[ match ] ) ) {
this[ match ]( context[ match ] );
// ...and otherwise set as attributes
} else {
this.attr( match, context[ match ] );
}
}
}
return this;
// HANDLE: $(#id)
} else {
elem = document.getElementById( match[2] );
// Support: Blackberry 4.6
// gEBID returns nodes no longer in the document (#6963)
if ( elem && elem.parentNode ) {
// Inject the element directly into the jQuery object
this.length = 1;
this[0] = elem;
}
this.context = document;
this.selector = selector;
return this;
}
// HANDLE: $(expr, $(...))
} else if ( !context || context.jquery ) {
return ( context || rootjQuery ).find( selector );
// HANDLE: $(expr, context)
// (which is just equivalent to: $(context).find(expr)
} else {
return this.constructor( context ).find( selector );
}
// HANDLE: $(DOMElement)
} else if ( selector.nodeType ) {
this.context = this[0] = selector;
this.length = 1;
return this;
// HANDLE: $(function)
// Shortcut for document ready
} else if ( jQuery.isFunction( selector ) ) {
return typeof rootjQuery.ready !== "undefined" ?
rootjQuery.ready( selector ) :
// Execute immediately if ready is not present
selector( jQuery );
}
if ( selector.selector !== undefined ) {
this.selector = selector.selector;
this.context = selector.context;
}
return jQuery.makeArray( selector, this );
};
// Give the init function the jQuery prototype for later instantiation
init.prototype = jQuery.fn;
// Initialize central reference
rootjQuery = jQuery( document );
return init;
});
define([
"../core",
"./var/rsingleTag",
"../manipulation" // buildFragment
], function( jQuery, rsingleTag ) {
// data: string of html
// context (optional): If specified, the fragment will be created in this context, defaults to document
// keepScripts (optional): If true, will include scripts passed in the html string
jQuery.parseHTML = function( data, context, keepScripts ) {
if ( !data || typeof data !== "string" ) {
return null;
}
if ( typeof context === "boolean" ) {
keepScripts = context;
context = false;
}
context = context || document;
var parsed = rsingleTag.exec( data ),
scripts = !keepScripts && [];
// Single tag
if ( parsed ) {
return [ context.createElement( parsed[1] ) ];
}
parsed = jQuery.buildFragment( [ data ], context, scripts );
if ( scripts && scripts.length ) {
jQuery( scripts ).remove();
}
return jQuery.merge( [], parsed.childNodes );
};
return jQuery.parseHTML;
});
define([
"../core",
"../core/init",
"../deferred"
], function( jQuery ) {
// The deferred used on DOM ready
var readyList;
jQuery.fn.ready = function( fn ) {
// Add the callback
jQuery.ready.promise().done( fn );
return this;
};
jQuery.extend({
// Is the DOM ready to be used? Set to true once it occurs.
isReady: false,
// A counter to track how many items to wait for before
// the ready event fires. See #6781
readyWait: 1,
// Hold (or release) the ready event
holdReady: function( hold ) {
if ( hold ) {
jQuery.readyWait++;
} else {
jQuery.ready( true );
}
},
// Handle when the DOM is ready
ready: function( wait ) {
// Abort if there are pending holds or we're already ready
if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
return;
}
// Remember that the DOM is ready
jQuery.isReady = true;
// If a normal DOM Ready event fired, decrement, and wait if need be
if ( wait !== true && --jQuery.readyWait > 0 ) {
return;
}
// If there are functions bound, to execute
readyList.resolveWith( document, [ jQuery ] );
// Trigger any bound ready events
if ( jQuery.fn.triggerHandler ) {
jQuery( document ).triggerHandler( "ready" );
jQuery( document ).off( "ready" );
}
}
});
/**
* The ready event handler and self cleanup method
*/
function completed() {
document.removeEventListener( "DOMContentLoaded", completed, false );
window.removeEventListener( "load", completed, false );
jQuery.ready();
}
jQuery.ready.promise = function( obj ) {
if ( !readyList ) {
readyList = jQuery.Deferred();
// Catch cases where $(document).ready() is called after the browser event has already occurred.
// We once tried to use readyState "interactive" here, but it caused issues like the one
// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
if ( document.readyState === "complete" ) {
// Handle it asynchronously to allow scripts the opportunity to delay ready
setTimeout( jQuery.ready );
} else {
// Use the handy event callback
document.addEventListener( "DOMContentLoaded", completed, false );
// A fallback to window.onload, that will always work
window.addEventListener( "load", completed, false );
}
}
return readyList.promise( obj );
};
// Kick off the DOM ready check even if the user does not
jQuery.ready.promise();
});
define(function() {
// Match a standalone tag
return (/^<(\w+)\s*\/?>(?:<\/\1>|)$/);
});
define(function() {
function addGetHookIf( conditionFn, hookFn ) {
// Define the hook, we'll check on the first run if it's really needed.
return {
get: function() {
if ( conditionFn() ) {
// Hook not needed (or it's not possible to use it due
// to missing dependency), remove it.
delete this.get;
return;
}
// Hook needed; redefine it so that the support test is not executed again.
return (this.get = hookFn).apply( this, arguments );
}
};
}
return addGetHookIf;
});
define([
"../core",
"./var/rnumnonpx",
"./var/rmargin",
"./var/getStyles",
"../selector" // contains
], function( jQuery, rnumnonpx, rmargin, getStyles ) {
function curCSS( elem, name, computed ) {
var width, minWidth, maxWidth, ret,
style = elem.style;
computed = computed || getStyles( elem );
// Support: IE9
// getPropertyValue is only needed for .css('filter') (#12537)
if ( computed ) {
ret = computed.getPropertyValue( name ) || computed[ name ];
}
if ( computed ) {
if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
ret = jQuery.style( elem, name );
}
// Support: iOS < 6
// A tribute to the "awesome hack by Dean Edwards"
// iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
// this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
// Remember the original values
width = style.width;
minWidth = style.minWidth;
maxWidth = style.maxWidth;
// Put in the new values to get a computed value out
style.minWidth = style.maxWidth = style.width = ret;
ret = computed.width;
// Revert the changed values
style.width = width;
style.minWidth = minWidth;
style.maxWidth = maxWidth;
}
}
return ret !== undefined ?
// Support: IE
// IE returns zIndex value as an integer.
ret + "" :
ret;
}
return curCSS;
});
define([
"../core",
"../manipulation" // appendTo
], function( jQuery ) {
var iframe,
elemdisplay = {};
/**
* Retrieve the actual display of a element
* @param {String} name nodeName of the element
* @param {Object} doc Document object
*/
// Called only from within defaultDisplay
function actualDisplay( name, doc ) {
var style,
elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
// getDefaultComputedStyle might be reliably used only on attached element
display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
// Use of this method is a temporary fix (more like optimization) until something better comes along,
// since it was removed from specification and supported only in FF
style.display : jQuery.css( elem[ 0 ], "display" );
// We don't have any data stored on the element,
// so use "detach" method as fast way to get rid of the element
elem.detach();
return display;
}
/**
* Try to determine the default display value of an element
* @param {String} nodeName
*/
function defaultDisplay( nodeName ) {
var doc = document,
display = elemdisplay[ nodeName ];
if ( !display ) {
display = actualDisplay( nodeName, doc );
// If the simple way fails, read from inside an iframe
if ( display === "none" || !display ) {
// Use the already-created iframe if possible
iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement );
// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
doc = iframe[ 0 ].contentDocument;
// Support: IE
doc.write();
doc.close();
display = actualDisplay( nodeName, doc );
iframe.detach();
}
// Store the correct default display
elemdisplay[ nodeName ] = display;
}
return display;
}
return defaultDisplay;
});
define([
"../core",
"../var/support"
], function( jQuery, support ) {
(function() {
var pixelPositionVal, boxSizingReliableVal,
docElem = document.documentElement,
container = document.createElement( "div" ),
div = document.createElement( "div" );
if ( !div.style ) {
return;
}
// Support: IE9-11+
// Style of cloned element affects source element cloned (#8908)
div.style.backgroundClip = "content-box";
div.cloneNode( true ).style.backgroundClip = "";
support.clearCloneStyle = div.style.backgroundClip === "content-box";
container.style.cssText = "border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;" +
"position:absolute";
container.appendChild( div );
// Executing both pixelPosition & boxSizingReliable tests require only one layout
// so they're executed at the same time to save the second computation.
function computePixelPositionAndBoxSizingReliable() {
div.style.cssText =
// Support: Firefox<29, Android 2.3
// Vendor-prefix box-sizing
"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +
"box-sizing:border-box;display:block;margin-top:1%;top:1%;" +
"border:1px;padding:1px;width:4px;position:absolute";
div.innerHTML = "";
docElem.appendChild( container );
var divStyle = window.getComputedStyle( div, null );
pixelPositionVal = divStyle.top !== "1%";
boxSizingReliableVal = divStyle.width === "4px";
docElem.removeChild( container );
}
// Support: node.js jsdom
// Don't assume that getComputedStyle is a property of the global object
if ( window.getComputedStyle ) {
jQuery.extend( support, {
pixelPosition: function() {
// This test is executed only once but we still do memoizing
// since we can use the boxSizingReliable pre-computing.
// No need to check if the test was already performed, though.
computePixelPositionAndBoxSizingReliable();
return pixelPositionVal;
},
boxSizingReliable: function() {
if ( boxSizingReliableVal == null ) {
computePixelPositionAndBoxSizingReliable();
}
return boxSizingReliableVal;
},
reliableMarginRight: function() {
// Support: Android 2.3
// Check if div with explicit width and no margin-right incorrectly
// gets computed margin-right based on width of container. (#3333)
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
// This support function is only executed once so no memoizing is needed.
var ret,
marginDiv = div.appendChild( document.createElement( "div" ) );
// Reset CSS: box-sizing; display; margin; border; padding
marginDiv.style.cssText = div.style.cssText =
// Support: Firefox<29, Android 2.3
// Vendor-prefix box-sizing
"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
"box-sizing:content-box;display:block;margin:0;border:0;padding:0";
marginDiv.style.marginRight = marginDiv.style.width = "0";
div.style.width = "1px";
docElem.appendChild( container );
ret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight );
docElem.removeChild( container );
div.removeChild( marginDiv );
return ret;
}
});
}
})();
return support;
});
define([
"../core"
], function( jQuery ) {
// A method for quickly swapping in/out CSS properties to get correct calculations.
jQuery.swap = function( elem, options, callback, args ) {
var ret, name,
old = {};
// Remember the old values, and insert the new ones
for ( name in options ) {
old[ name ] = elem.style[ name ];
elem.style[ name ] = options[ name ];
}
ret = callback.apply( elem, args || [] );
// Revert the old values
for ( name in options ) {
elem.style[ name ] = old[ name ];
}
return ret;
};
return jQuery.swap;
});
define(function() {
return [ "Top", "Right", "Bottom", "Left" ];
});
define(function() {
return function( elem ) {
// Support: IE<=11+, Firefox<=30+ (#15098, #14150)
// IE throws on elements created in popups
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
if ( elem.ownerDocument.defaultView.opener ) {
return elem.ownerDocument.defaultView.getComputedStyle( elem, null );
}
return window.getComputedStyle( elem, null );
};
});
define([
"../../core",
"../../selector"
// css is assumed
], function( jQuery ) {
return function( elem, el ) {
// isHidden might be called from jQuery#filter function;
// in that case, element will be second argument
elem = el || elem;
return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
};
});
define([
"../../var/pnum"
], function( pnum ) {
return new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
});
define([
"../core"
], function( jQuery ) {
/**
* Determines whether an object can have data
*/
jQuery.acceptData = function( owner ) {
// Accepts only:
// - Node
// - Node.ELEMENT_NODE
// - Node.DOCUMENT_NODE
// - Object
// - Any
/* jshint -W018 */
return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
};
return jQuery.acceptData;
});
define([
"../Data"
], function( Data ) {
return new Data();
});
define([
"../Data"
], function( Data ) {
return new Data();
});
define([
"./core",
"./core/access",
"./css"
], function( jQuery, access ) {
// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
// Margin is only for outerHeight, outerWidth
jQuery.fn[ funcName ] = function( margin, value ) {
var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
return access( this, function( elem, type, value ) {
var doc;
if ( jQuery.isWindow( elem ) ) {
// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
// isn't a whole lot we can do. See pull request at this URL for discussion:
// https://github.com/jquery/jquery/pull/764
return elem.document.documentElement[ "client" + name ];
}
// Get document width or height
if ( elem.nodeType === 9 ) {
doc = elem.documentElement;
// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
// whichever is greatest
return Math.max(
elem.body[ "scroll" + name ], doc[ "scroll" + name ],
elem.body[ "offset" + name ], doc[ "offset" + name ],
doc[ "client" + name ]
);
}
return value === undefined ?
// Get width or height on the element, requesting but not forcing parseFloat
jQuery.css( elem, type, extra ) :
// Set width or height on the element
jQuery.style( elem, type, value, extra );
}, type, chainable ? margin : undefined, chainable, null );
};
});
});
return jQuery;
});
define([
"../core",
"../css"
], function( jQuery ) {
function Tween( elem, options, prop, end, easing ) {
return new Tween.prototype.init( elem, options, prop, end, easing );
}
jQuery.Tween = Tween;
Tween.prototype = {
constructor: Tween,
init: function( elem, options, prop, end, easing, unit ) {
this.elem = elem;
this.prop = prop;
this.easing = easing || "swing";
this.options = options;
this.start = this.now = this.cur();
this.end = end;
this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
},
cur: function() {
var hooks = Tween.propHooks[ this.prop ];
return hooks && hooks.get ?
hooks.get( this ) :
Tween.propHooks._default.get( this );
},
run: function( percent ) {
var eased,
hooks = Tween.propHooks[ this.prop ];
if ( this.options.duration ) {
this.pos = eased = jQuery.easing[ this.easing ](
percent, this.options.duration * percent, 0, 1, this.options.duration
);
} else {
this.pos = eased = percent;
}
this.now = ( this.end - this.start ) * eased + this.start;
if ( this.options.step ) {
this.options.step.call( this.elem, this.now, this );
}
if ( hooks && hooks.set ) {
hooks.set( this );
} else {
Tween.propHooks._default.set( this );
}
return this;
}
};
Tween.prototype.init.prototype = Tween.prototype;
Tween.propHooks = {
_default: {
get: function( tween ) {
var result;
if ( tween.elem[ tween.prop ] != null &&
(!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
return tween.elem[ tween.prop ];
}
// Passing an empty string as a 3rd parameter to .css will automatically
// attempt a parseFloat and fallback to a string if the parse fails.
// Simple values such as "10px" are parsed to Float;
// complex values such as "rotate(1rad)" are returned as-is.
result = jQuery.css( tween.elem, tween.prop, "" );
// Empty strings, null, undefined and "auto" are converted to 0.
return !result || result === "auto" ? 0 : result;
},
set: function( tween ) {
// Use step hook for back compat.
// Use cssHook if its there.
// Use .style if available and use plain properties where available.
if ( jQuery.fx.step[ tween.prop ] ) {
jQuery.fx.step[ tween.prop ]( tween );
} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
} else {
tween.elem[ tween.prop ] = tween.now;
}
}
}
};
// Support: IE9
// Panic based approach to setting things on disconnected nodes
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
set: function( tween ) {
if ( tween.elem.nodeType && tween.elem.parentNode ) {
tween.elem[ tween.prop ] = tween.now;
}
}
};
jQuery.easing = {
linear: function( p ) {
return p;
},
swing: function( p ) {
return 0.5 - Math.cos( p * Math.PI ) / 2;
}
};
jQuery.fx = Tween.prototype.init;
// Back Compat <1.8 extension point
jQuery.fx.step = {};
});
define([
"../core",
"../event"
], function( jQuery ) {
// Attach a bunch of functions for handling common AJAX events
jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
jQuery.fn[ type ] = function( fn ) {
return this.on( type, fn );
};
});
});
define([
"../core",
"../event"
], function( jQuery ) {
jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
"change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
// Handle event binding
jQuery.fn[ name ] = function( data, fn ) {
return arguments.length > 0 ?
this.on( name, null, data, fn ) :
this.trigger( name );
};
});
jQuery.fn.extend({
hover: function( fnOver, fnOut ) {
return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
},
bind: function( types, data, fn ) {
return this.on( types, null, data, fn );
},
unbind: function( types, fn ) {
return this.off( types, null, fn );
},
delegate: function( selector, types, data, fn ) {
return this.on( types, selector, data, fn );
},
undelegate: function( selector, types, fn ) {
// ( namespace ) or ( selector, types [, fn] )
return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
}
});
});
define([
"../var/support"
], function( support ) {
support.focusinBubbles = "onfocusin" in window;
return support;
});
define([
"../core"
], function( jQuery ) {
// Register as a named AMD module, since jQuery can be concatenated with other
// files that may use define, but not via a proper concatenation script that
// understands anonymous AMD modules. A named AMD is safest and most robust
// way to register. Lowercase jquery is used because AMD module names are
// derived from file names, and jQuery is normally delivered in a lowercase
// file name. Do this after creating the global so that if an AMD module wants
// to call noConflict to hide this version of jQuery, it will work.
// Note that for maximum portability, libraries that are not jQuery should
// declare themselves as anonymous modules, and avoid setting a global if an
// AMD loader is present. jQuery is a special case. For more information, see
// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
if ( typeof define === "function" && define.amd ) {
define( "jquery", [], function() {
return jQuery;
});
}
});
define([
"../core",
"../var/strundefined"
], function( jQuery, strundefined ) {
var
// Map over jQuery in case of overwrite
_jQuery = window.jQuery,
// Map over the $ in case of overwrite
_$ = window.$;
jQuery.noConflict = function( deep ) {
if ( window.$ === jQuery ) {
window.$ = _$;
}
if ( deep && window.jQuery === jQuery ) {
window.jQuery = _jQuery;
}
return jQuery;
};
// Expose jQuery and $ identifiers, even in AMD
// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
// and CommonJS for browser emulators (#13566)
if ( typeof noGlobal === strundefined ) {
window.jQuery = window.$ = jQuery;
}
});
/*!
* jQuery JavaScript Library v@VERSION
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: @DATE
*/
(function( global, factory ) {
if ( typeof module === "object" && typeof module.exports === "object" ) {
// For CommonJS and CommonJS-like environments where a proper `window`
// is present, execute the factory and get jQuery.
// For environments that do not have a `window` with a `document`
// (such as Node.js), expose a factory as module.exports.
// This accentuates the need for the creation of a real `window`.
// e.g. var jQuery = require("jquery")(window);
// See ticket #14549 for more info.
module.exports = global.document ?
factory( global, true ) :
function( w ) {
if ( !w.document ) {
throw new Error( "jQuery requires a window with a document" );
}
return factory( w );
};
} else {
factory( global );
}
// Pass this if window is not defined yet
}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
// Support: Firefox 18+
// Can't be in strict mode, several libs including ASP.NET trace
// the stack via arguments.caller.callee and Firefox dies if
// you try to trace through "use strict" call chains. (#13335)
//"use strict";
define([
"./core",
"./selector",
"./traversing",
"./callbacks",
"./deferred",
"./core/ready",
"./data",
"./queue",
"./queue/delay",
"./attributes",
"./event",
"./event/alias",
"./manipulation",
"./manipulation/_evalUrl",
"./wrap",
"./css",
"./css/hiddenVisibleSelectors",
"./serialize",
"./ajax",
"./ajax/xhr",
"./ajax/script",
"./ajax/jsonp",
"./ajax/load",
"./event/ajax",
"./effects",
"./effects/animatedSelector",
"./offset",
"./dimensions",
"./deprecated",
"./exports/amd",
"./exports/global"
], function( jQuery ) {
return jQuery;
});
define([
"../ajax"
], function( jQuery ) {
jQuery._evalUrl = function( url ) {
return jQuery.ajax({
url: url,
type: "GET",
dataType: "script",
async: false,
global: false,
"throws": true
});
};
return jQuery._evalUrl;
});
define([
"../var/support"
], function( support ) {
(function() {
var fragment = document.createDocumentFragment(),
div = fragment.appendChild( document.createElement( "div" ) ),
input = document.createElement( "input" );
// Support: Safari<=5.1
// Check state lost if the name is set (#11217)
// Support: Windows Web Apps (WWA)
// `name` and `type` must use .setAttribute for WWA (#14901)
input.setAttribute( "type", "radio" );
input.setAttribute( "checked", "checked" );
input.setAttribute( "name", "t" );
div.appendChild( input );
// Support: Safari<=5.1, Android<4.2
// Older WebKit doesn't clone checked state correctly in fragments
support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
// Support: IE<=11+
// Make sure textarea (and checkbox) defaultValue is properly cloned
div.innerHTML = "<textarea>x</textarea>";
support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
})();
return support;
});
define(function() {
return (/^(?:checkbox|radio)$/i);
});
define([
"./core",
"./data/var/data_priv",
"./deferred",
"./callbacks"
], function( jQuery, data_priv ) {
jQuery.extend({
queue: function( elem, type, data ) {
var queue;
if ( elem ) {
type = ( type || "fx" ) + "queue";
queue = data_priv.get( elem, type );
// Speed up dequeue by getting out quickly if this is just a lookup
if ( data ) {
if ( !queue || jQuery.isArray( data ) ) {
queue = data_priv.access( elem, type, jQuery.makeArray(data) );
} else {
queue.push( data );
}
}
return queue || [];
}
},
dequeue: function( elem, type ) {
type = type || "fx";
var queue = jQuery.queue( elem, type ),
startLength = queue.length,
fn = queue.shift(),
hooks = jQuery._queueHooks( elem, type ),
next = function() {
jQuery.dequeue( elem, type );
};
// If the fx queue is dequeued, always remove the progress sentinel
if ( fn === "inprogress" ) {
fn = queue.shift();
startLength--;
}
if ( fn ) {
// Add a progress sentinel to prevent the fx queue from being
// automatically dequeued
if ( type === "fx" ) {
queue.unshift( "inprogress" );
}
// Clear up the last queue stop function
delete hooks.stop;
fn.call( elem, next, hooks );
}
if ( !startLength && hooks ) {
hooks.empty.fire();
}
},
// Not public - generate a queueHooks object, or return the current one
_queueHooks: function( elem, type ) {
var key = type + "queueHooks";
return data_priv.get( elem, key ) || data_priv.access( elem, key, {
empty: jQuery.Callbacks("once memory").add(function() {
data_priv.remove( elem, [ type + "queue", key ] );
})
});
}
});
jQuery.fn.extend({
queue: function( type, data ) {
var setter = 2;
if ( typeof type !== "string" ) {
data = type;
type = "fx";
setter--;
}
if ( arguments.length < setter ) {
return jQuery.queue( this[0], type );
}
return data === undefined ?
this :
this.each(function() {
var queue = jQuery.queue( this, type, data );
// Ensure a hooks for this queue
jQuery._queueHooks( this, type );
if ( type === "fx" && queue[0] !== "inprogress" ) {
jQuery.dequeue( this, type );
}
});
},
dequeue: function( type ) {
return this.each(function() {
jQuery.dequeue( this, type );
});
},
clearQueue: function( type ) {
return this.queue( type || "fx", [] );
},
// Get a promise resolved when queues of a certain type
// are emptied (fx is the type by default)
promise: function( type, obj ) {
var tmp,
count = 1,
defer = jQuery.Deferred(),
elements = this,
i = this.length,
resolve = function() {
if ( !( --count ) ) {
defer.resolveWith( elements, [ elements ] );
}
};
if ( typeof type !== "string" ) {
obj = type;
type = undefined;
}
type = type || "fx";
while ( i-- ) {
tmp = data_priv.get( elements[ i ], type + "queueHooks" );
if ( tmp && tmp.empty ) {
count++;
tmp.empty.add( resolve );
}
}
resolve();
return defer.promise( obj );
}
});
return jQuery;
});
define([
"../core",
"../queue",
"../effects" // Delay is optional because of this dependency
], function( jQuery ) {
// Based off of the plugin by Clint Helfers, with permission.
// http://blindsignals.com/index.php/2009/07/jquery-delay/
jQuery.fn.delay = function( time, type ) {
time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
type = type || "fx";
return this.queue( type, function( next, hooks ) {
var timeout = setTimeout( next, time );
hooks.stop = function() {
clearTimeout( timeout );
};
});
};
return jQuery.fn.delay;
});
define([
"./core"
], function( jQuery ) {
/*
* Optional (non-Sizzle) selector module for custom builds.
*
* Note that this DOES NOT SUPPORT many documented jQuery
* features in exchange for its smaller size:
*
* Attribute not equal selector
* Positional selectors (:first; :eq(n); :odd; etc.)
* Type selectors (:input; :checkbox; :button; etc.)
* State-based selectors (:animated; :visible; :hidden; etc.)
* :has(selector)
* :not(complex selector)
* custom selectors via Sizzle extensions
* Leading combinators (e.g., $collection.find("> *"))
* Reliable functionality on XML fragments
* Requiring all parts of a selector to match elements under context
* (e.g., $div.find("div > *") now matches children of $div)
* Matching against non-elements
* Reliable sorting of disconnected nodes
* querySelectorAll bug fixes (e.g., unreliable :focus on WebKit)
*
* If any of these are unacceptable tradeoffs, either use Sizzle or
* customize this stub for the project's specific needs.
*/
var docElem = window.document.documentElement,
selector_hasDuplicate,
matches = docElem.matches ||
docElem.webkitMatchesSelector ||
docElem.mozMatchesSelector ||
docElem.oMatchesSelector ||
docElem.msMatchesSelector,
selector_sortOrder = function( a, b ) {
// Flag for duplicate removal
if ( a === b ) {
selector_hasDuplicate = true;
return 0;
}
var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
if ( compare ) {
// Disconnected nodes
if ( compare & 1 ) {
// Choose the first element that is related to our document
if ( a === document || jQuery.contains(document, a) ) {
return -1;
}
if ( b === document || jQuery.contains(document, b) ) {
return 1;
}
// Maintain original order
return 0;
}
return compare & 4 ? -1 : 1;
}
// Not directly comparable, sort on existence of method
return a.compareDocumentPosition ? -1 : 1;
};
jQuery.extend({
find: function( selector, context, results, seed ) {
var elem, nodeType,
i = 0;
results = results || [];
context = context || document;
// Same basic safeguard as Sizzle
if ( !selector || typeof selector !== "string" ) {
return results;
}
// Early return if context is not an element or document
if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
return [];
}
if ( seed ) {
while ( (elem = seed[i++]) ) {
if ( jQuery.find.matchesSelector(elem, selector) ) {
results.push( elem );
}
}
} else {
jQuery.merge( results, context.querySelectorAll(selector) );
}
return results;
},
unique: function( results ) {
var elem,
duplicates = [],
i = 0,
j = 0;
selector_hasDuplicate = false;
results.sort( selector_sortOrder );
if ( selector_hasDuplicate ) {
while ( (elem = results[i++]) ) {
if ( elem === results[ i ] ) {
j = duplicates.push( i );
}
}
while ( j-- ) {
results.splice( duplicates[ j ], 1 );
}
}
return results;
},
text: function( elem ) {
var node,
ret = "",
i = 0,
nodeType = elem.nodeType;
if ( !nodeType ) {
// If no nodeType, this is expected to be an array
while ( (node = elem[i++]) ) {
// Do not traverse comment nodes
ret += jQuery.text( node );
}
} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
// Use textContent for elements
return elem.textContent;
} else if ( nodeType === 3 || nodeType === 4 ) {
return elem.nodeValue;
}
// Do not include comment or processing instruction nodes
return ret;
},
contains: function( a, b ) {
var adown = a.nodeType === 9 ? a.documentElement : a,
bup = b && b.parentNode;
return a === bup || !!( bup && bup.nodeType === 1 && adown.contains(bup) );
},
isXMLDoc: function( elem ) {
return (elem.ownerDocument || elem).documentElement.nodeName !== "HTML";
},
expr: {
attrHandle: {},
match: {
bool: /^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$/i,
needsContext: /^[\x20\t\r\n\f]*[>+~]/
}
}
});
jQuery.extend( jQuery.find, {
matches: function( expr, elements ) {
return jQuery.find( expr, null, null, elements );
},
matchesSelector: function( elem, expr ) {
return matches.call( elem, expr );
},
attr: function( elem, name ) {
return elem.getAttribute( name );
}
});
});
define([
"./core",
"sizzle"
], function( jQuery, Sizzle ) {
jQuery.find = Sizzle;
jQuery.expr = Sizzle.selectors;
jQuery.expr[":"] = jQuery.expr.pseudos;
jQuery.unique = Sizzle.uniqueSort;
jQuery.text = Sizzle.getText;
jQuery.isXMLDoc = Sizzle.isXML;
jQuery.contains = Sizzle.contains;
});
define([
"./core",
"./manipulation/var/rcheckableType",
"./core/init",
"./traversing", // filter
"./attributes/prop"
], function( jQuery, rcheckableType ) {
var r20 = /%20/g,
rbracket = /\[\]$/,
rCRLF = /\r?\n/g,
rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
rsubmittable = /^(?:input|select|textarea|keygen)/i;
function buildParams( prefix, obj, traditional, add ) {
var name;
if ( jQuery.isArray( obj ) ) {
// Serialize array item.
jQuery.each( obj, function( i, v ) {
if ( traditional || rbracket.test( prefix ) ) {
// Treat each array item as a scalar.
add( prefix, v );
} else {
// Item is non-scalar (array or object), encode its numeric index.
buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
}
});
} else if ( !traditional && jQuery.type( obj ) === "object" ) {
// Serialize object item.
for ( name in obj ) {
buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
}
} else {
// Serialize scalar item.
add( prefix, obj );
}
}
// Serialize an array of form elements or a set of
// key/values into a query string
jQuery.param = function( a, traditional ) {
var prefix,
s = [],
add = function( key, value ) {
// If value is a function, invoke it and return its value
value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
};
// Set traditional to true for jQuery <= 1.3.2 behavior.
if ( traditional === undefined ) {
traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
}
// If an array was passed in, assume that it is an array of form elements.
if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
// Serialize the form elements
jQuery.each( a, function() {
add( this.name, this.value );
});
} else {
// If traditional, encode the "old" way (the way 1.3.2 or older
// did it), otherwise encode params recursively.
for ( prefix in a ) {
buildParams( prefix, a[ prefix ], traditional, add );
}
}
// Return the resulting serialization
return s.join( "&" ).replace( r20, "+" );
};
jQuery.fn.extend({
serialize: function() {
return jQuery.param( this.serializeArray() );
},
serializeArray: function() {
return this.map(function() {
// Can add propHook for "elements" to filter or add form elements
var elements = jQuery.prop( this, "elements" );
return elements ? jQuery.makeArray( elements ) : this;
})
.filter(function() {
var type = this.type;
// Use .is( ":disabled" ) so that fieldset[disabled] works
return this.name && !jQuery( this ).is( ":disabled" ) &&
rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
( this.checked || !rcheckableType.test( type ) );
})
.map(function( i, elem ) {
var val = jQuery( this ).val();
return val == null ?
null :
jQuery.isArray( val ) ?
jQuery.map( val, function( val ) {
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
}) :
{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
}).get();
}
});
return jQuery;
});
define([
"./core",
"./var/indexOf",
"./traversing/var/rneedsContext",
"./core/init",
"./traversing/findFilter",
"./selector"
], function( jQuery, indexOf, rneedsContext ) {
var rparentsprev = /^(?:parents|prev(?:Until|All))/,
// Methods guaranteed to produce a unique set when starting from a unique set
guaranteedUnique = {
children: true,
contents: true,
next: true,
prev: true
};
jQuery.extend({
dir: function( elem, dir, until ) {
var matched = [],
truncate = until !== undefined;
while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) {
if ( elem.nodeType === 1 ) {
if ( truncate && jQuery( elem ).is( until ) ) {
break;
}
matched.push( elem );
}
}
return matched;
},
sibling: function( n, elem ) {
var matched = [];
for ( ; n; n = n.nextSibling ) {
if ( n.nodeType === 1 && n !== elem ) {
matched.push( n );
}
}
return matched;
}
});
jQuery.fn.extend({
has: function( target ) {
var targets = jQuery( target, this ),
l = targets.length;
return this.filter(function() {
var i = 0;
for ( ; i < l; i++ ) {
if ( jQuery.contains( this, targets[i] ) ) {
return true;
}
}
});
},
closest: function( selectors, context ) {
var cur,
i = 0,
l = this.length,
matched = [],
pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
jQuery( selectors, context || this.context ) :
0;
for ( ; i < l; i++ ) {
for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
// Always skip document fragments
if ( cur.nodeType < 11 && (pos ?
pos.index(cur) > -1 :
// Don't pass non-elements to Sizzle
cur.nodeType === 1 &&
jQuery.find.matchesSelector(cur, selectors)) ) {
matched.push( cur );
break;
}
}
}
return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched );
},
// Determine the position of an element within the set
index: function( elem ) {
// No argument, return index in parent
if ( !elem ) {
return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
}
// Index in selector
if ( typeof elem === "string" ) {
return indexOf.call( jQuery( elem ), this[ 0 ] );
}
// Locate the position of the desired element
return indexOf.call( this,
// If it receives a jQuery object, the first element is used
elem.jquery ? elem[ 0 ] : elem
);
},
add: function( selector, context ) {
return this.pushStack(
jQuery.unique(
jQuery.merge( this.get(), jQuery( selector, context ) )
)
);
},
addBack: function( selector ) {
return this.add( selector == null ?
this.prevObject : this.prevObject.filter(selector)
);
}
});
function sibling( cur, dir ) {
while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {}
return cur;
}
jQuery.each({
parent: function( elem ) {
var parent = elem.parentNode;
return parent && parent.nodeType !== 11 ? parent : null;
},
parents: function( elem ) {
return jQuery.dir( elem, "parentNode" );
},
parentsUntil: function( elem, i, until ) {
return jQuery.dir( elem, "parentNode", until );
},
next: function( elem ) {
return sibling( elem, "nextSibling" );
},
prev: function( elem ) {
return sibling( elem, "previousSibling" );
},
nextAll: function( elem ) {
return jQuery.dir( elem, "nextSibling" );
},
prevAll: function( elem ) {
return jQuery.dir( elem, "previousSibling" );
},
nextUntil: function( elem, i, until ) {
return jQuery.dir( elem, "nextSibling", until );
},
prevUntil: function( elem, i, until ) {
return jQuery.dir( elem, "previousSibling", until );
},
siblings: function( elem ) {
return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
},
children: function( elem ) {
return jQuery.sibling( elem.firstChild );
},
contents: function( elem ) {
return elem.contentDocument || jQuery.merge( [], elem.childNodes );
}
}, function( name, fn ) {
jQuery.fn[ name ] = function( until, selector ) {
var matched = jQuery.map( this, fn, until );
if ( name.slice( -5 ) !== "Until" ) {
selector = until;
}
if ( selector && typeof selector === "string" ) {
matched = jQuery.filter( selector, matched );
}
if ( this.length > 1 ) {
// Remove duplicates
if ( !guaranteedUnique[ name ] ) {
jQuery.unique( matched );
}
// Reverse order for parents* and prev-derivatives
if ( rparentsprev.test( name ) ) {
matched.reverse();
}
}
return this.pushStack( matched );
};
});
return jQuery;
});
define([
"../core",
"../var/indexOf",
"./var/rneedsContext",
"../selector"
], function( jQuery, indexOf, rneedsContext ) {
var risSimple = /^.[^:#\[\.,]*$/;
// Implement the identical functionality for filter and not
function winnow( elements, qualifier, not ) {
if ( jQuery.isFunction( qualifier ) ) {
return jQuery.grep( elements, function( elem, i ) {
/* jshint -W018 */
return !!qualifier.call( elem, i, elem ) !== not;
});
}
if ( qualifier.nodeType ) {
return jQuery.grep( elements, function( elem ) {
return ( elem === qualifier ) !== not;
});
}
if ( typeof qualifier === "string" ) {
if ( risSimple.test( qualifier ) ) {
return jQuery.filter( qualifier, elements, not );
}
qualifier = jQuery.filter( qualifier, elements );
}
return jQuery.grep( elements, function( elem ) {
return ( indexOf.call( qualifier, elem ) >= 0 ) !== not;
});
}
jQuery.filter = function( expr, elems, not ) {
var elem = elems[ 0 ];
if ( not ) {
expr = ":not(" + expr + ")";
}
return elems.length === 1 && elem.nodeType === 1 ?
jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
return elem.nodeType === 1;
}));
};
jQuery.fn.extend({
find: function( selector ) {
var i,
len = this.length,
ret = [],
self = this;
if ( typeof selector !== "string" ) {
return this.pushStack( jQuery( selector ).filter(function() {
for ( i = 0; i < len; i++ ) {
if ( jQuery.contains( self[ i ], this ) ) {
return true;
}
}
}) );
}
for ( i = 0; i < len; i++ ) {
jQuery.find( selector, self[ i ], ret );
}
// Needed because $( selector, context ) becomes $( context ).find( selector )
ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
ret.selector = this.selector ? this.selector + " " + selector : selector;
return ret;
},
filter: function( selector ) {
return this.pushStack( winnow(this, selector || [], false) );
},
not: function( selector ) {
return this.pushStack( winnow(this, selector || [], true) );
},
is: function( selector ) {
return !!winnow(
this,
// If this is a positional/relative selector, check membership in the returned set
// so $("p:first").is("p:last") won't return true for a doc with two "p".
typeof selector === "string" && rneedsContext.test( selector ) ?
jQuery( selector ) :
selector || [],
false
).length;
}
});
});
define([
"../../core",
"../../selector"
], function( jQuery ) {
return jQuery.expr.match.needsContext;
});
define(function() {
// [[Class]] -> type pairs
return {};
});
define([
"./arr"
], function( arr ) {
return arr.concat;
});
define([
"./class2type"
], function( class2type ) {
return class2type.hasOwnProperty;
});
define([
"./arr"
], function( arr ) {
return arr.indexOf;
});
define(function() {
return (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;
});
define([
"./arr"
], function( arr ) {
return arr.push;
});
define([
"./arr"
], function( arr ) {
return arr.slice;
});
define(function() {
return typeof undefined;
});
define(function() {
// All support tests are defined in their respective modules.
return {};
});
define([
"./class2type"
], function( class2type ) {
return class2type.toString;
});
define([
"./core",
"./core/init",
"./manipulation", // clone
"./traversing" // parent, contents
], function( jQuery ) {
jQuery.fn.extend({
wrapAll: function( html ) {
var wrap;
if ( jQuery.isFunction( html ) ) {
return this.each(function( i ) {
jQuery( this ).wrapAll( html.call(this, i) );
});
}
if ( this[ 0 ] ) {
// The elements to wrap the target around
wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
if ( this[ 0 ].parentNode ) {
wrap.insertBefore( this[ 0 ] );
}
wrap.map(function() {
var elem = this;
while ( elem.firstElementChild ) {
elem = elem.firstElementChild;
}
return elem;
}).append( this );
}
return this;
},
wrapInner: function( html ) {
if ( jQuery.isFunction( html ) ) {
return this.each(function( i ) {
jQuery( this ).wrapInner( html.call(this, i) );
});
}
return this.each(function() {
var self = jQuery( this ),
contents = self.contents();
if ( contents.length ) {
contents.wrapAll( html );
} else {
self.append( html );
}
});
},
wrap: function( html ) {
var isFunction = jQuery.isFunction( html );
return this.each(function( i ) {
jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
});
},
unwrap: function() {
return this.parent().each(function() {
if ( !jQuery.nodeName( this, "body" ) ) {
jQuery( this ).replaceWith( this.childNodes );
}
}).end();
}
});
return jQuery;
});
// Include gulp
var gulp = require('gulp');
// Include Our Plugins
var jshint = require('gulp-jshint');
var sass = require('gulp-sass');
var nodemon = require('gulp-nodemon');
var concat = require('gulp-concat');
// Lint Task
gulp.task('lint', function() {
return gulp.src(['app.js', 'routes/**/*.js', 'models/**/*.js', 'config/**/*.js', 'public/javascripts/**/*.js'])
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
// Compile Our Sass
gulp.task('sass', function() {
return gulp.src(['scss/*.scss'])
.pipe(sass())
.pipe(concat('style.css'))
.pipe(gulp.dest('public/stylesheets'));
});
// Watch Files For Changes
gulp.task('watch', function() {
gulp.watch('scss/**/*.scss', ['sass']);
});
gulp.task('nodemon', function (cb) {
var started = false;
return nodemon({
script: 'bin/www'
}).on('start', function () {
// to avoid nodemon being started multiple times
// thanks @matthisk
if (!started) {
cb();
started = true;
}
});
});
// Default Task
gulp.task('default', ['lint', 'sass', 'watch', 'nodemon']);
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
var schema = new Schema({
name: {type: String, required: true, trim: true},
email: {type: String, required: true, index: true, unique: true, trim: true},
password: {type: String},
createdAt: {type: Date, default: Date.now}
}, {
toJSON: { virtuals: true},
toObject: {virtuals: true}
});
var User = mongoose.model('User', schema);
module.exports = User;
// 전체 삭제
db.users.drop()
// Insert (Create)
db.users.insert({name: 'Kim', age: 30, tel: '555-6666', gender: 'm'})
db.users.insert({name: 'Lee', age: 22, tel: '444-6666', gender: 'm'})
db.users.insert({name: 'Cho', age: 23, tel: '222-2222', gender: 'm'})
db.users.insert({name: 'Park', age: 43, gender: 'f', scores: [100, 200, 600]})
db.users.insert({name: 'Choi', age: 26, gender: 'f', department: {name: 'CS', loc: 'Yongin'}})
// Query (Read)
db.users.find()
db.users.find({gender: 'm'})
db.users.find({name: { $in: ['Park', 'Choi']}})
db.users.find({gender: 'm', age: { $gt: 25}})
db.users.find({$or: [{age: {$lte: 23}}, {gender: 'f'}]})
db.users.find({scores: 200})
db.users.find({'department.name': 'CS'})
// Modify (Update)
db.users.update({name: 'Lee'}, {$set: {age: 23}})
db.users.update({name: 'Cho'}, {name: 'Choo', age: 40, scores: [100, 200]})
db.users.update({name: 'Jay'}, {name: 'Jay', gender: 'm', age: 50}, {upsert: true})
db.users.update({name: 'Jay'}, {name: 'Jay', gender: 'f', age: 25}, {upsert: true})
db.users.update({name: 'Choo'}, {$set: {gender: 'f'}})
db.users.update({name: 'Lee'}, {$unset: {tel: 1}})
// Remove (Delete)
db.users.count()
db.users.remove({name: 'Choi'})
db.users.count()
// Aggregate
db.users.find()
db.users.aggregate([
{$match: {age: {$gt: 23}}},
{$group: {_id: "$gender", cnt: {$sum: 1} }},
{$sort: {cnt: -1}}
])
{
"name": "ex01",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
},
"dependencies": {
"body-parser": "~1.13.1",
"connect-flash": "^0.1.1",
"cookie-parser": "~1.3.5",
"debug": "~2.2.0",
"express": "~4.13.0",
"express-session": "^1.11.3",
"jade": "~1.11.0",
"method-override": "^2.3.5",
"moment": "^2.10.6",
"mongoose": "^4.1.11",
"morgan": "~1.6.1",
"node-sass-middleware": "0.8.0",
"serve-favicon": "~2.3.0"
},
"devDependencies": {
"gulp": "^3.9.0",
"gulp-concat": "^2.6.0",
"gulp-jshint": "^1.11.2",
"gulp-nodemon": "^2.0.4",
"gulp-sass": "^2.0.4"
}
}
form.todos {
width: 100%;
margin: 0 0 1em 0;
padding: 1em;
background: #acddf2; }
form.todos .main input[type='text'] {
font-size: 1.4em;
border: 1px solid #2c9cd2;
padding: 0.5em 1em;
margin-bottom: 1em;
width: 100%;
box-sizing: border-box; }
form.todos .actions button {
margin-top: 1em; }
.tasks {
width: 100%;
list-style: none;
padding: 0;
margin: 0; }
.tasks li.task {
border-bottom: 1px solid #eaeaea;
padding: 1em 0; }
.tasks li.task span {
display: inline-block;
margin-right: 1em; }
.tasks li.task .check {
width: 2em;
height: 2em;
border-radius: 1em;
border: 1px solid #2c9cd2;
vertical-align: bottom; }
.tasks li.task .content {
font-size: 1.1em;
font-weight: bold;
line-height: 2em; }
.tasks li.task .category {
float: right;
min-width: 5em;
font-size: 0.9em; }
.tasks li.task .priority {
font-size: 0.8em;
border-radius: 0.8em;
background-color: #888;
color: #fff;
height: 200%;
line-height: 1.6em;
text-align: center;
padding: 0 1em; }
.tasks li.task .priority.p2 {
background-color: #b0b33c; }
.tasks li.task .priority.p3 {
background-color: #a51e23; }
.tasks li.task .deadline {
color: #ccc;
font-size: 0.9em; }
.side .section {
background: #888;
width: 100%;
color: #fff; }
.side .section a {
color: #fff;
display: inline-block;
text-decoration: none;
width: 100%;
box-sizing: border-box;
padding: 0.5em 1em 0.5em 3em;
border-bottom: 1px solid #fff; }
.side .section a:last-child {
border-bottom: 0; }
.side .section a.all {
background: #444; }
.side .section a.selected {
padding-left: 1em;
background-color: #009eec; }
.side .section a.selected:before {
font-family: FontAwesome;
content: "\f00c";
display: inline-block;
vertical-align: middle;
padding-right: 1em; }
.side .section a:hover, .side .section a.selected:hover {
background-color: #337AB7; }
.form-signin {
width: 320px;
height: 300px;
padding: 0;
top: 10em;
left: 50%;
position: absolute;
margin: 0 0 0 -160px; }
.form-signin .checkbox {
margin-bottom: 10px;
font-weight: normal; }
.form-signin .form-control {
position: relative;
height: auto;
box-sizing: border-box;
padding: 10px;
font-size: 16px; }
.form-signin .form-control:focus {
z-index: 2; }
.form-signin input[type="email"] {
margin-bottom: -1px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0; }
.form-signin input[type="password"] {
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0; }
body {
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
margin-top: 50px;
padding-top: 1em; }
a {
color: #00B7FF; }
.jumbotron {
margin-top: -1em;
background: url("/images/bg.jpg") no-repeat left top;
-webkit-background-size: 100%;
-moz-background-size: 100%;
-o-background-size: 100%;
background-size: 100%;
min-height: 20em;
color: #fff;
text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3); }
.form-actions {
padding: 19px 20px 20px;
margin-top: 20px;
margin-bottom: 20px;
background-color: #f5f5f5;
border-top: 1px solid #e5e5e5; }
.footer {
position: absolute;
bottom: 0;
width: 100%;
height: 60px;
background-color: #f5f5f5; }
.footer .container {
padding-right: 1em;
padding-left: 1em; }
.footer .container .text-muted {
margin: 20px 0;
color: #bbb; }
var express = require('express'),
todos = require('./todos'),
User = require('../models/User');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index');
});
router.get('/signin', function(req, res, next) {
res.render('signin');
});
router.post('/signin', function(req, res, next) {
User.findOne({email: req.body.email}, function(err, user) {
if (err) {
res.render('error', {message: "Error", error: err});
} else if (!user) {
req.flash('danger', '존재하지 않는 사용자 입니다.');
res.redirect('back');
} else if (user.password !== req.body.password) {
req.flash('danger', '비밀번호가 일치하지 않습니다.');
res.redirect('back');
} else {
req.session.user = user;
req.flash('success', '로그인 되었습니다.');
res.redirect('/todos');
}
});
});
router.get('/signout', function(req, res, next) {
delete req.session.user;
req.flash('success', '로그아웃 되었습니다.');
res.redirect('/');
});
router.use('/todos', todos);
module.exports = router;
var express = require('express');
var router = express.Router();
router.get('/', function(req, res, next) {
res.render('todos', {
tasks: [
{_id: 1, content: '이런저런일1', category: '학교', priority: 3, deadline: null},
{_id: 2, content: '이런저런일2', category: null, priority: 2, deadline: null},
{_id: 3, content: '이런저런일3', category: '집', priority: 3, deadline: new Date("2015-12-25")},
{_id: 4, content: '이런저런일4', category: '학교', priority: 1, deadline: new Date("2015-11-21")},
{_id: 5, content: '이런저런일5', category: '집', priority: 2, deadline: null},
],
categories: [
'학교',
'집',
]
});
});
router.post('/', function(req, res, next) {
req.flash('success', '새로운 할 일이 저장되었습니다.');
res.redirect('/todos');
});
router.put('/:id', function(req, res, next) {
req.flash('success', '할 일이 변경되었습니다.');
res.redirect('/todos');
});
router.delete('/:id', function(req, res, next) {
req.flash('success', '할 일이 삭제되었습니다.');
res.redirect('/todos');
});
module.exports = router;
var express = require('express'),
User = require('../models/User');
var router = express.Router();
function needAuth(req, res, next) {
if (req.session.user) {
next();
} else {
req.flash('danger', '로그인이 필요합니다.');
res.redirect('/signin');
}
}
function validateForm(form, options) {
var name = form.name || "";
var email = form.email || "";
name = name.trim();
email = email.trim();
if (!name) {
return '이름을 입력해주세요.';
}
if (!email) {
return '이메일을 입력해주세요.';
}
if (!form.password && options.needPassword) {
return '비밀번호를 입력해주세요.';
}
if (form.password !== form.password_confirmation) {
return '비밀번호가 일치하지 않습니다.';
}
if (form.password.length < 6) {
return '비밀번호는 6글자 이상이어야 합니다.';
}
return null;
}
/* GET users listing. */
router.get('/', needAuth, function(req, res, next) {
User.find({}, function(err, users) {
if (err) {
return next(err);
}
res.render('users/index', {users: users});
});
});
router.get('/new', function(req, res, next) {
res.render('users/new', {messages: req.flash()});
});
router.get('/:id/edit', function(req, res, next) {
User.findById(req.params.id, function(err, user) {
if (err) {
return next(err);
}
res.render('users/edit', {user: user});
});
});
router.put('/:id', function(req, res, next) {
var err = validateForm(req.body);
if (err) {
req.flash('danger', err);
return res.redirect('back');
}
User.findById({_id: req.params.id}, function(err, user) {
if (err) {
return next(err);
}
if (!user) {
req.flash('danger', '존재하지 않는 사용자입니다.');
return res.redirect('back');
}
if (user.password !== req.body.current_password) {
req.flash('danger', '현재 비밀번호가 일치하지 않습니다.');
return res.redirect('back');
}
user.name = req.body.name;
user.email = req.body.email;
if (req.body.password) {
user.password = req.body.password;
}
user.save(function(err) {
if (err) {
return next(err);
}
req.flash('success', '사용자 정보가 변경되었습니다.');
res.redirect('/users');
});
});
});
router.delete('/:id', function(req, res, next) {
User.findOneAndRemove({_id: req.params.id}, function(err) {
if (err) {
return next(err);
}
req.flash('success', '사용자 계정이 삭제되었습니다.');
res.redirect('/users');
});
});
router.get('/:id', function(req, res, next) {
User.findById(req.params.id, function(err, user) {
if (err) {
return next(err);
}
res.render('users/show', {user: user});
});
});
router.post('/', function(req, res, next) {
var err = validateForm(req.body, {needPassword: true});
if (err) {
req.flash('danger', err);
return res.redirect('back');
}
User.findOne({email: req.body.email}, function(err, user) {
if (err) {
return next(err);
}
if (user) {
req.flash('danger', '동일한 이메일 주소가 이미 존재합니다.');
res.redirect('back');
}
var newUser = new User({
name: req.body.name,
email: req.body.email,
});
newUser.password = req.body.password;
newUser.save(function(err) {
if (err) {
return next(err);
} else {
req.flash('success', '가입이 완료되었습니다. 로그인 해주세요.');
res.redirect('/');
}
});
});
});
module.exports = router;
.form-signin {
width: 320px;
height: 300px;
padding: 0;
top: 10em;
left: 50%;
position: absolute;
margin: 0 0 0 -160px;
.checkbox {
margin-bottom: 10px;
font-weight: normal;
}
.form-control {
position: relative;
height: auto;
box-sizing: border-box;
padding: 10px;
font-size: 16px;
}
.form-control:focus {
z-index: 2;
}
input[type="email"] {
margin-bottom: -1px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
input[type="password"] {
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
}
body {
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
margin-top: 50px;
padding-top: 1em;
& > .main-content {
min-height: 400px;
}
}
a {
color: #00B7FF
}
.jumbotron {
margin-top: -1em;
background: url('/images/bg.jpg') no-repeat left top;
-webkit-background-size: 100%;
-moz-background-size: 100%;
-o-background-size: 100%;
background-size: 100%;
min-height: 20em;
color: #fff;
text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}
.form-actions {
padding: 19px 20px 20px;
margin-top: 20px;
margin-bottom: 20px;
background-color: #f5f5f5;
border-top: 1px solid #e5e5e5;
}
.footer {
margin-top: 1em;
width: 100%;
height: 60px;
background-color: #f5f5f5;
.container {
padding-right: 1em;
padding-left: 1em;
.text-muted {
margin: 20px 0;
color: #bbb;
}
}
}
form.todos {
width: 100%;
margin: 0 0 1em 0;
padding: 1em;
background: #acddf2;
.main {
input[type='text'] {
font-size: 1.4em;
border: 1px solid #2c9cd2;
padding: 0.5em 1em;
margin-bottom: 1em;
width: 100%;
box-sizing: border-box;
}
}
.actions button {
margin-top: 1em;
}
}
.tasks {
width: 100%;
list-style: none;
padding: 0;
margin: 0;
li.task {
border-bottom: 1px solid #eaeaea;
padding: 1em 0;
span {
display: inline-block;
margin-right: 1em;
}
.check {
width: 2em;
height: 2em;
border-radius: 1em;
border: 1px solid #2c9cd2;
vertical-align: bottom;
}
.content {
font-size: 1.1em;
font-weight: bold;
line-height: 2em;
}
.category {
float: right;
min-width: 5em;
font-size: 0.9em;
}
.priority {
font-size: 0.8em;
border-radius: 0.8em;
background-color: #888;
color: #fff;
height: 200%;
line-height: 1.6em;
text-align: center;
padding: 0 1em;
&.p2 {
background-color: #b0b33c;
}
&.p3 {
background-color: #a51e23;
}
}
.deadline {
color: #ccc;
font-size: 0.9em;
}
}
}
.side {
.section {
background: #888;
width: 100%;
color: #fff;
a {
color: #fff;
display: inline-block;
text-decoration: none;
width: 100%;
box-sizing: border-box;
padding: 0.5em 1em 0.5em 3em;
border-bottom: 1px solid #fff;
&:last-child {
border-bottom: 0;
}
&.all {
background: #444;
}
}
a.selected {
padding-left: 1em;
background-color: #009eec;
&:before {
font-family: FontAwesome;
content: "\f00c";
display: inline-block;
vertical-align: middle;
padding-right: 1em;
}
}
a:hover, a.selected:hover {
background-color: #337AB7;
}
}
}
extends layout
block content
.container
.panel.panel-danger(style='margin-top:2em')
.panel-heading
h3.panel-title= message
.panel-body
p= error.status
pre #{error.stack}
.footer
.container
p.text-muted
| All rights reserved. &copy; 2015 Myongji University.
form.form-inline(action='/todos', method='POST', class='todos')
.form
.main
input(type='text', id='task', name='task', placeholder='해야할 일이 무엇인가요?')
.sub
.form-group
input.form-control(type='text', id='category', name='category', placeholder='분류')
.form-group
select.form-control(name='priority')
option(value='1') 중요
option(value='2', selected) 보통
option(value='3') 사소
.form-group
input.form-control(type='date', id='deadline', name='deadline')
.actions
button.btn.btn-primary.btn-lg.btn-block(type='submit') 저장
ul.tasks
each task in tasks
li.task(data-id='#{task._id}')
span.check
span.content= task.content
if task.category
span.label.label-default.category= task.category
span.priority(class='p#{task.priority}')
case task.priority
when 1
| 사소
when 2
| 보통
when 3
| 중요
if task.deadline
span.deadline= moment(task.deadline).format('YYYY-MM-DD')
h3 완료여부
.section.priority
a(data-value='completed').selected 완료
a(data-value='uncompleted').selected 미완료
a(data-value='all').all 전체
h3 마감
.section.deadline
a(data-value='past') 과거
a(data-value='today').selected 오늘
a(data-value='week') 이번주
a(data-value='month') 이번달
a(data-value='all').all 전체
h3 중요도
.section.priority
a(data-value='3').selected 중요
a(data-value='2') 보통
a(data-value='1') 사소
a(data-value='all').all 전체
h3 분류
.section.categories
each category in categories
a(data-value='text').selected= category
a(data-value='none').selected <분류없음>
a(data-value='all').all 전체
.navbar.navbar-inverse.navbar-fixed-top
.container
.navbar-header
button.navbar-toggle.collapsed(type='button', data-toggle='collapse', data-target='#navbar', aria-expanded='false', aria-controls='navbar')
span.sr-only Toggle navigation
span.icon-bar
span.icon-bar
span.icon-bar
a.navbar-brand(href='/')
i.fa.fa-home
#navbar.collapse.navbar-collapse
ul.nav.navbar-nav
li
a(href='/todos') Todo List
li
a(href='/users') Users
ul.nav.navbar-nav.navbar-right
if (!currentUser)
li
a(href='/signin') Signin
li
a(href='/users/new') Signup
else
li
a(href='/users/#{currentUser._id}') Profile
li
a(href='/signout') Signout
extends layout
block hero-unit
.jumbotron
.container
h1 BIGBANG-TODO
block content
.container
.row
.col-md-6
h3 서비스 목적
p 본 서비스는 웹프로그래밍 수업을 위해서 sample로 만들어보는 것입니다.
.col-md-6
h3 주요 기능
ul
li 사용자 관리
li 할 일 기록
li 기록 내용: 분류, 내용, 중요도, deadline
li 완료된 일 체크
doctype html
html(lang='ko')
head
block title
title BBDO
meta(charset='UTF-8')
link(rel='stylesheet', href='/bower_components/bootstrap/dist/css/bootstrap-theme.css')
link(rel='stylesheet', href='/bower_components/bootstrap/dist/css/bootstrap.css')
link(rel='stylesheet', href='/bower_components/font-awesome/css/font-awesome.min.css')
link(rel='stylesheet', href='/stylesheets/style.css')
script(type='text/javascript', src='/bower_components/jquery/dist/jquery.js')
script(type='text/javascript', src='/bower_components/bootstrap/dist/js/bootstrap.js')
body
block top-nav
include ./includes/topnav
block hero-unit
if flashMessages
each texts, type in flashMessages
.container
.alert(class='alert-#{type}')
each msg in texts
p= msg
block content
block footer
include ./includes/footer
extends layout
block content
.container
form.form-signin(action='/signin', method='POST')
label(for='email', class='sr-only') Email address
input(
type='email', id='email', name='email', class='form-control',
placeholder='Email address', required, autofocus
)
label(for='password', class='sr-only') Password
input(
type='password', id='password', name='password', class='form-control',
placeholder='Password', required, autofocus
)
button.btn.btn-lg.btn-primary.btn-block(type='submit') 로그인
hr
a.btn.btn-default.btn-mini(href='/users/new') 회원가입
|
a.btn.btn-default.btn-mini(href='/reset-password') 비밀번호 재설정
extends layout
block content
.container
.row
.col-md-8
include ./includes/todo-main
.col-md-4.side
include ./includes/todo-side
extends ../layout
block content
.container
h1.page-header 회원정보 수정
form(action='/users/#{user._id}?_method=PUT', method='POST')
.form-group
label(for='name') Name
input.form-control(type='text', id='name', name='name', placeholder='Your name', value=user.name)
.form-group
label(for='email') Email address
input.form-control(type='email', id='email', name='email', placeholder='Email', value=user.email)
.form-group
label(for='current_password') 현재 Password
input.form-control(type='password', id='current_password', name='current_password', placeholder='현재 Password')
.form-group
label(for='password') 변경할 Password
input.form-control(type='password', id='password', name='password', placeholder='변경할 Password')
.form-group
label(for='password_confirmation') Password 확인
input.form-control(type='password', id='password_confirmation', name='password_confirmation', placeholder='변경할 Password 확인')
div.form-actions
a.btn.btn-default(href='javascript:window.history.back();') 뒤로
|
button.btn.btn-primary(type='submit') 수정
extends ../layout
block content
.container
h1.page-header 회원 목록
table.table.table-striped.table-bordered
thead
tr
th 이름
th 이메일
th 가입일시
th
tbody
each user in users
tr
td
a(href='/users/#{user._id}')= user.name
td= user.email
td= moment(user.createdAt).format('YYYY-MM-DD HH:mm:ss')
td
a.btn.btn-xs.btn-default(href='/users/#{user._id}/edit') 수정
|
a.btn.btn-xs.btn-default(href='/users/#{user._id}?_method=DELETE') 삭제
a.btn.btn-primary(href='/users/new') 사용자추가
extends ../layout
block content
.container
h1.page-header 회원가입
form(action='/users', method='POST')
.form-group
label(for='name') Name
input.form-control(type='text', id='name', name='name', placeholder='Your name')
.form-group
label(for='email') Email address
input.form-control(type='email', id='email', name='email', placeholder='Email')
.form-group
label(for='password') Password
input.form-control(type='password', id='password', name='password', placeholder='Password')
.form-group
label(for='password_confirmation') Password 확인
input.form-control(type='password', id='password_confirmation', name='password_confirmation', placeholder='Password')
div.form-actions
a.btn.btn-default(href='javascript:window.history.back();') 뒤로
|
button.btn.btn-primary(type='submit') 회원가입
extends ../layout
block content
.container
h1.page-header 회원 정보
ul
li 이름: #{user.name}
li 이메일: #{user.email}
hr
p
a.btn.btn-default(href='/users/') 목록
|
a.btn.btn-default(href='/users/#{user._id}/edit') 수정
|
a.btn.btn-default(href='/users/#{user._id}?_method=DELETE') 삭제
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.