diff --git a/public/css/gogs.css b/public/css/gogs.css
index 545e2b0b6846..89da6055b822 100755
--- a/public/css/gogs.css
+++ b/public/css/gogs.css
@@ -560,7 +560,9 @@ html, body {
.file-list .icon {
font-size: 17px;
padding: 5px 0 4px 10px;
- width: 40px;
+ width: 50px;
+ color: #999;
+ text-align: right;
}
.file-list .wrap {
@@ -588,6 +590,19 @@ html, body {
text-align: right;
}
+.file-content .file-head {
+ font-size: 18px;
+}
+
+.file-content .file-head .icon {
+ color: #666;
+ margin: 0 .5em 0 0;
+}
+
+.file-content .file-body {
+ padding: 30px 30px 50px;
+}
+
#wrapper {
min-height: 100%;
height: auto !important;
diff --git a/public/css/markdown.css b/public/css/markdown.css
new file mode 100644
index 000000000000..e2b15c2f13de
--- /dev/null
+++ b/public/css/markdown.css
@@ -0,0 +1,317 @@
+.markdown {
+ font-size: 14px;
+}
+
+.markdown a {
+ color: #4183C4;
+}
+
+.markdown h1,
+.markdown h2,
+.markdown h3,
+.markdown h4,
+.markdown h5,
+.markdown h6 {
+ line-height: 1.7;
+ padding: 15px 0 0;
+ margin: 0 0 15px;
+ color: #666;
+}
+
+.markdown h1,
+.markdown h2 {
+ border-bottom: 1px solid #EEE;
+}
+
+.markdown h2 {
+ border-bottom: 1px solid #EEE;
+}
+
+.markdown h1 {
+ color: #000;
+ font-size: 33px
+}
+
+.markdown h2 {
+ color: #333;
+ font-size: 28px
+}
+
+.markdown h3 {
+ font-size: 22px
+}
+
+.markdown h4 {
+ font-size: 18px
+}
+
+.markdown h5 {
+ font-size: 14px
+}
+
+.markdown h6 {
+ font-size: 14px
+}
+
+.markdown table {
+ border-collapse: collapse;
+ border-spacing: 0;
+ display: block;
+ overflow: auto;
+ width: 100%;
+ margin: 0 0 9px;
+}
+
+.markdown table th {
+ font-weight: 700
+}
+
+.markdown table th,
+.markdown table td {
+ border: 1px solid #DDD;
+ padding: 6px 13px;
+}
+
+.markdown table tr {
+ background-color: #FFF;
+ border-top: 1px solid #CCC;
+}
+
+.markdown table tr:nth-child(2n) {
+ background-color: #F8F8F8
+}
+
+.markdown li {
+ line-height: 1.6;
+ margin-top: 6px;
+}
+
+.markdown dl dt {
+ font-style: italic;
+ margin-top: 9px;
+}
+
+.markdown dl dd {
+ margin: 0 0 9px;
+ padding: 0 9px;
+}
+
+.markdown blockquote,
+.markdown blockquote p {
+ font-size: 14px;
+ background-color: #f5f5f5;
+}
+
+.markdown > pre {
+ line-height: 1.6;
+ overflow: auto;
+ background: #fff;
+ padding: 6px 10px;
+ border: 1px solid #ddd;
+}
+
+.markdown > pre.linenums {
+ padding: 0;
+}
+
+.markdown > pre > ol.linenums {
+ -webkit-box-shadow: inset 40px 0 0 #f5f5f5, inset 41px 0 0 #ccc;
+ box-shadow: inset 40px 0 0 #f5f5f5, inset 41px 0 0 #ccc;
+}
+
+.markdown > pre > code,
+.markdown > pre > ol.linenums > li > code {
+ white-space: pre;
+ word-wrap: normal;
+}
+
+.markdown > pre > ol.linenums > li > code {
+ padding: 0 10px;
+}
+
+.markdown > pre > ol.linenums > li:first-child {
+ padding-top: 6px;
+}
+
+.markdown > pre > ol.linenums > li:last-child {
+ padding-bottom: 6px;
+}
+
+.markdown > pre > ol.linenums > li {
+ border-left: 1px solid #ddd;
+}
+
+.markdown hr {
+ border: none;
+ color: #ccc;
+ height: 4px;
+ padding: 0;
+ margin: 15px 0;
+ border-bottom: 2px solid #EEE;
+}
+
+.markdown blockquote:last-child,
+.markdown ul:last-child,
+.markdown ol:last-child,
+.markdown > pre:last-child,
+.markdown > pre:last-child,
+.markdown p:last-child {
+ margin-bottom: 0;
+}
+
+.markdown .btn {
+ color: #fff;
+}
+
+/* Author: jmblog */
+/* Project: https://github.com/jmblog/color-themes-for-google-code-prettify */
+/* GitHub Theme */
+/* Pretty printing styles. Used with prettify.js. */
+/* SPAN elements with the classes below are added by prettyprint. */
+/* plain text */
+.pln {
+ color: #333333;
+}
+
+@media screen {
+ /* string content */
+ .str {
+ color: #dd1144;
+ }
+
+ /* a keyword */
+ .kwd {
+ color: #333333;
+ }
+
+ /* a comment */
+ .com {
+ color: #999988;
+ }
+
+ /* a type name */
+ .typ {
+ color: #445588;
+ }
+
+ /* a literal value */
+ .lit {
+ color: #445588;
+ }
+
+ /* punctuation */
+ .pun {
+ color: #333333;
+ }
+
+ /* lisp open bracket */
+ .opn {
+ color: #333333;
+ }
+
+ /* lisp close bracket */
+ .clo {
+ color: #333333;
+ }
+
+ /* a markup tag name */
+ .tag {
+ color: navy;
+ }
+
+ /* a markup attribute name */
+ .atn {
+ color: teal;
+ }
+
+ /* a markup attribute value */
+ .atv {
+ color: #dd1144;
+ }
+
+ /* a declaration */
+ .dec {
+ color: #333333;
+ }
+
+ /* a variable name */
+ .var {
+ color: teal;
+ }
+
+ /* a function name */
+ .fun {
+ color: #990000;
+ }
+}
+/* Use higher contrast and text-weight for printable form. */
+@media print, projection {
+ .str {
+ color: #006600;
+ }
+
+ .kwd {
+ color: #006;
+ font-weight: bold;
+ }
+
+ .com {
+ color: #600;
+ font-style: italic;
+ }
+
+ .typ {
+ color: #404;
+ font-weight: bold;
+ }
+
+ .lit {
+ color: #004444;
+ }
+
+ .pun, .opn, .clo {
+ color: #444400;
+ }
+
+ .tag {
+ color: #006;
+ font-weight: bold;
+ }
+
+ .atn {
+ color: #440044;
+ }
+
+ .atv {
+ color: #006600;
+ }
+}
+
+/* Specify class=linenums on a pre to get line numbering */
+ol.linenums {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+/* IE indents via margin-left */
+li.L0,
+li.L1,
+li.L2,
+li.L3,
+li.L4,
+li.L5,
+li.L6,
+li.L7,
+li.L8,
+li.L9 {
+ /* */
+}
+
+/* Alternate shading for lines */
+li.L1,
+li.L3,
+li.L5,
+li.L7,
+li.L9 {
+ /* */
+}
\ No newline at end of file
diff --git a/public/js/app.js b/public/js/app.js
index 4a5d2053470c..94e38cc13440 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -111,4 +111,13 @@ function initUserSetting(){
});
}
});
-}
\ No newline at end of file
+}
+
+;(function($){
+ // on Dom Ready
+ $(function(){
+ var $pre = $('.markdown').find('pre > code').parent();
+ $pre.addClass("prettyprint");
+ prettyPrint();
+ });
+})(jQuery);
diff --git a/public/js/bootstrap.min.js b/public/js/bootstrap.min.js
index 39beec466265..d6821920e318 100755
--- a/public/js/bootstrap.min.js
+++ b/public/js/bootstrap.min.js
@@ -4,262 +4,3 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
if("undefined"==typeof jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('
').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown",h),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=" li:not(.divider):visible a",i=f.find("[role=menu]"+h+", [role=listbox]"+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());c.is("a")&&b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this,d=this.tip();this.setContent(),this.options.animation&&d.addClass("fade");var e="function"==typeof this.options.placement?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,f=/\s?auto?\s?/i,g=f.test(e);g&&(e=e.replace(f,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(e),this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);var h=this.getPosition(),i=d[0].offsetWidth,j=d[0].offsetHeight;if(g){var k=this.$element.parent(),l=e,m=document.documentElement.scrollTop||document.body.scrollTop,n="body"==this.options.container?window.innerWidth:k.outerWidth(),o="body"==this.options.container?window.innerHeight:k.outerHeight(),p="body"==this.options.container?0:k.offset().left;e="bottom"==e&&h.top+h.height+j-m>o?"top":"top"==e&&h.top-m-j<0?"bottom":"right"==e&&h.right+i>n?"left":"left"==e&&h.left-i'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery);
-
-/* ===========================================================
- * forked from bootstrap-confirmation.js
- * http://ethaizone.github.io/Bootstrap-Confirmation/
- * ===========================================================
- * Copyright 2013 Nimit Suwannagate
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * =========================================================== */
-!function ($) {
- 'use strict';
-
- //var for check event at body can have only one.
- var event_body = false;
-
- // CONFIRMATION PUBLIC CLASS DEFINITION
- // ===============================
- var Confirmation = function (element, options) {
- var that = this;
-
- this.init('confirmation', element, options);
-
-
- $(element).on('show.bs.confirmation', function(e) {
- that.options.onShow(e, this);
-
- $(this).addClass('open');
-
- var options = that.options;
- var all = options.all_selector;
-
- if(options.singleton) {
- $(all+'.in').not(that.$element).confirmation('hide');
- }
- });
-
- $(element).on('hide.bs.confirmation', function(e) {
- that.options.onHide(e, this);
-
- $(this).removeClass('open');
- });
-
- $(element).on('shown.bs.confirmation', function(e) {
- var options = that.options;
- var all = options.all_selector;
-
- that.$element.on('click.dismiss.bs.confirmation', '[data-dismiss="confirmation"]', $.proxy(that.hide, that));
-
- if(that.isPopout()) {
- if(!event_body) {
- event_body = $('body').on('click', function (e) {
- if(that.$element.is(e.target)) return;
- if(that.$element.has(e.target).length) return;
- if($('.popover').has(e.target).length) return;
-
- that.$element.confirmation('hide');
-
- $('body').unbind(e);
-
- event_body = false;
-
- return;
- });
- }
- }
- });
-
- $(element).on('click', function(e) {
- e.preventDefault();
- });
- }
-
- if (!$.fn.popover || !$.fn.tooltip) throw new Error('Confirmation requires popover.js and tooltip.js');
-
- Confirmation.DEFAULTS = $.extend({}, $.fn.popover.Constructor.DEFAULTS, {
- placement : 'top',
- title : 'Are you sure?',
- btnOkClass : 'btn btn-danger btn-sm',
- btnOkLabel : 'Yes',
- btnOkIcon : '',
- btnCancelClass : 'btn btn-default btn-sm',
- btnCancelLabel : 'Cancel',
- btnCancelIcon : '',
- href : '#',
- target : '_self',
- singleton : true,
- popout : true,
- onShow : function(event, element){},
- onHide : function(event, element){},
- onConfirm : function(event, element){},
- onCancel : function(event, element){},
- template : ''
- });
-
-
- // NOTE: CONFIRMATION EXTENDS popover.js
- // ================================
- Confirmation.prototype = $.extend({}, $.fn.popover.Constructor.prototype);
-
- Confirmation.prototype.constructor = Confirmation;
-
- Confirmation.prototype.getDefaults = function () {
- return Confirmation.DEFAULTS;
- }
-
- Confirmation.prototype.setContent = function () {
- var that = this;
- var $tip = this.tip();
- var title = this.getTitle();
- var $btnOk = $tip.find('[data-apply="confirmation"]');
- var $btnCancel = $tip.find('[data-dismiss="confirmation"]');
- var options = this.options
-
- $btnOk.addClass(this.getBtnOkClass())
- .html(this.getBtnOkLabel())
- .prepend($('').addClass(this.getBtnOkIcon()), " ")
- .attr('href', this.getHref())
- .attr('target', this.getTarget())
- .off('click').on('click', function(event) {
- options.onConfirm(event, that.$element);
-
- that.$element.confirmation('hide');
- });
-
- $btnCancel.addClass(this.getBtnCancelClass())
- .html(this.getBtnCancelLabel())
- .prepend($('').addClass(this.getBtnCancelIcon()), " ")
- .off('click').on('click', function(event){
- options.onCancel(event, that.$element);
-
- that.$element.confirmation('hide');
- });
-
- $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title);
-
- $tip.removeClass('fade top bottom left right in');
-
- // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
- // this manually by checking the contents.
- if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide();
- }
-
- Confirmation.prototype.getBtnOkClass = function () {
- var $e = this.$element;
- var o = this.options;
-
- return $e.attr('data-btnOkClass') || (typeof o.btnOkClass == 'function' ? o.btnOkClass.call($e[0]) : o.btnOkClass);
- }
-
- Confirmation.prototype.getBtnOkLabel = function () {
- var $e = this.$element;
- var o = this.options;
-
- return $e.attr('data-btnOkLabel') || (typeof o.btnOkLabel == 'function' ? o.btnOkLabel.call($e[0]) : o.btnOkLabel);
- }
-
- Confirmation.prototype.getBtnOkIcon = function () {
- var $e = this.$element;
- var o = this.options;
-
- return $e.attr('data-btnOkIcon') || (typeof o.btnOkIcon == 'function' ? o.btnOkIcon.call($e[0]) : o.btnOkIcon);
- }
-
- Confirmation.prototype.getBtnCancelClass = function () {
- var $e = this.$element;
- var o = this.options;
-
- return $e.attr('data-btnCancelClass') || (typeof o.btnCancelClass == 'function' ? o.btnCancelClass.call($e[0]) : o.btnCancelClass);
- }
-
- Confirmation.prototype.getBtnCancelLabel = function () {
- var $e = this.$element;
- var o = this.options;
-
- return $e.attr('data-btnCancelLabel') || (typeof o.btnCancelLabel == 'function' ? o.btnCancelLabel.call($e[0]) : o.btnCancelLabel);
- }
-
- Confirmation.prototype.getBtnCancelIcon = function () {
- var $e = this.$element;
- var o = this.options;
-
- return $e.attr('data-btnCancelIcon') || (typeof o.btnCancelIcon == 'function' ? o.btnCancelIcon.call($e[0]) : o.btnCancelIcon);
- }
-
- Confirmation.prototype.getHref = function () {
- var $e = this.$element;
- var o = this.options;
-
- return $e.attr('data-href') || (typeof o.href == 'function' ? o.href.call($e[0]) : o.href);
- }
-
- Confirmation.prototype.getTarget = function () {
- var $e = this.$element;
- var o = this.options;
-
- return $e.attr('data-target') || (typeof o.target == 'function' ? o.target.call($e[0]) : o.target);
- }
-
- Confirmation.prototype.isPopout = function () {
- var popout;
- var $e = this.$element;
- var o = this.options;
-
- popout = $e.attr('data-popout') || (typeof o.popout == 'function' ? o.popout.call($e[0]) : o.popout);
-
- if(popout == 'false') popout = false;
-
- return popout
- }
-
-
- // CONFIRMATION PLUGIN DEFINITION
- // =========================
- var old = $.fn.confirmation;
-
- $.fn.confirmation = function (option) {
- var that = this;
-
- return this.each(function () {
- var $this = $(this);
- var data = $this.data('bs.confirmation');
- var options = typeof option == 'object' && option;
-
- options = options || {};
- options.all_selector = that.selector;
-
- if (!data && option == 'destroy') return;
- if (!data) $this.data('bs.confirmation', (data = new Confirmation(this, options)));
- if (typeof option == 'string') data[option]();
- });
- }
-
- $.fn.confirmation.Constructor = Confirmation
-
-
- // CONFIRMATION NO CONFLICT
- // ===================
- $.fn.confirmation.noConflict = function () {
- $.fn.confirmation = old;
-
- return this;
- }
-}(jQuery);
\ No newline at end of file
diff --git a/public/js/lib.js b/public/js/lib.js
new file mode 100644
index 000000000000..c858d27df05f
--- /dev/null
+++ b/public/js/lib.js
@@ -0,0 +1,415 @@
+/* ===========================================================
+ * forked from bootstrap-confirmation.js
+ * http://ethaizone.github.io/Bootstrap-Confirmation/
+ * ===========================================================
+ * Copyright 2013 Nimit Suwannagate
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================================================== */
+!function ($) {
+ 'use strict';
+
+ //var for check event at body can have only one.
+ var event_body = false;
+
+ // CONFIRMATION PUBLIC CLASS DEFINITION
+ // ===============================
+ var Confirmation = function (element, options) {
+ var that = this;
+
+ this.init('confirmation', element, options);
+
+
+ $(element).on('show.bs.confirmation', function(e) {
+ that.options.onShow(e, this);
+
+ $(this).addClass('open');
+
+ var options = that.options;
+ var all = options.all_selector;
+
+ if(options.singleton) {
+ $(all+'.in').not(that.$element).confirmation('hide');
+ }
+ });
+
+ $(element).on('hide.bs.confirmation', function(e) {
+ that.options.onHide(e, this);
+
+ $(this).removeClass('open');
+ });
+
+ $(element).on('shown.bs.confirmation', function(e) {
+ var options = that.options;
+ var all = options.all_selector;
+
+ that.$element.on('click.dismiss.bs.confirmation', '[data-dismiss="confirmation"]', $.proxy(that.hide, that));
+
+ if(that.isPopout()) {
+ if(!event_body) {
+ event_body = $('body').on('click', function (e) {
+ if(that.$element.is(e.target)) return;
+ if(that.$element.has(e.target).length) return;
+ if($('.popover').has(e.target).length) return;
+
+ that.$element.confirmation('hide');
+
+ $('body').unbind(e);
+
+ event_body = false;
+
+ return;
+ });
+ }
+ }
+ });
+
+ $(element).on('click', function(e) {
+ e.preventDefault();
+ });
+ }
+
+ if (!$.fn.popover || !$.fn.tooltip) throw new Error('Confirmation requires popover.js and tooltip.js');
+
+ Confirmation.DEFAULTS = $.extend({}, $.fn.popover.Constructor.DEFAULTS, {
+ placement : 'top',
+ title : 'Are you sure?',
+ btnOkClass : 'btn btn-danger btn-sm',
+ btnOkLabel : 'Yes',
+ btnOkIcon : '',
+ btnCancelClass : 'btn btn-default btn-sm',
+ btnCancelLabel : 'Cancel',
+ btnCancelIcon : '',
+ href : '#',
+ target : '_self',
+ singleton : true,
+ popout : true,
+ onShow : function(event, element){},
+ onHide : function(event, element){},
+ onConfirm : function(event, element){},
+ onCancel : function(event, element){},
+ template : ''
+ });
+
+
+ // NOTE: CONFIRMATION EXTENDS popover.js
+ // ================================
+ Confirmation.prototype = $.extend({}, $.fn.popover.Constructor.prototype);
+
+ Confirmation.prototype.constructor = Confirmation;
+
+ Confirmation.prototype.getDefaults = function () {
+ return Confirmation.DEFAULTS;
+ }
+
+ Confirmation.prototype.setContent = function () {
+ var that = this;
+ var $tip = this.tip();
+ var title = this.getTitle();
+ var $btnOk = $tip.find('[data-apply="confirmation"]');
+ var $btnCancel = $tip.find('[data-dismiss="confirmation"]');
+ var options = this.options
+
+ $btnOk.addClass(this.getBtnOkClass())
+ .html(this.getBtnOkLabel())
+ .prepend($('').addClass(this.getBtnOkIcon()), " ")
+ .attr('href', this.getHref())
+ .attr('target', this.getTarget())
+ .off('click').on('click', function(event) {
+ options.onConfirm(event, that.$element);
+
+ that.$element.confirmation('hide');
+ });
+
+ $btnCancel.addClass(this.getBtnCancelClass())
+ .html(this.getBtnCancelLabel())
+ .prepend($('').addClass(this.getBtnCancelIcon()), " ")
+ .off('click').on('click', function(event){
+ options.onCancel(event, that.$element);
+
+ that.$element.confirmation('hide');
+ });
+
+ $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title);
+
+ $tip.removeClass('fade top bottom left right in');
+
+ // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
+ // this manually by checking the contents.
+ if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide();
+ }
+
+ Confirmation.prototype.getBtnOkClass = function () {
+ var $e = this.$element;
+ var o = this.options;
+
+ return $e.attr('data-btnOkClass') || (typeof o.btnOkClass == 'function' ? o.btnOkClass.call($e[0]) : o.btnOkClass);
+ }
+
+ Confirmation.prototype.getBtnOkLabel = function () {
+ var $e = this.$element;
+ var o = this.options;
+
+ return $e.attr('data-btnOkLabel') || (typeof o.btnOkLabel == 'function' ? o.btnOkLabel.call($e[0]) : o.btnOkLabel);
+ }
+
+ Confirmation.prototype.getBtnOkIcon = function () {
+ var $e = this.$element;
+ var o = this.options;
+
+ return $e.attr('data-btnOkIcon') || (typeof o.btnOkIcon == 'function' ? o.btnOkIcon.call($e[0]) : o.btnOkIcon);
+ }
+
+ Confirmation.prototype.getBtnCancelClass = function () {
+ var $e = this.$element;
+ var o = this.options;
+
+ return $e.attr('data-btnCancelClass') || (typeof o.btnCancelClass == 'function' ? o.btnCancelClass.call($e[0]) : o.btnCancelClass);
+ }
+
+ Confirmation.prototype.getBtnCancelLabel = function () {
+ var $e = this.$element;
+ var o = this.options;
+
+ return $e.attr('data-btnCancelLabel') || (typeof o.btnCancelLabel == 'function' ? o.btnCancelLabel.call($e[0]) : o.btnCancelLabel);
+ }
+
+ Confirmation.prototype.getBtnCancelIcon = function () {
+ var $e = this.$element;
+ var o = this.options;
+
+ return $e.attr('data-btnCancelIcon') || (typeof o.btnCancelIcon == 'function' ? o.btnCancelIcon.call($e[0]) : o.btnCancelIcon);
+ }
+
+ Confirmation.prototype.getHref = function () {
+ var $e = this.$element;
+ var o = this.options;
+
+ return $e.attr('data-href') || (typeof o.href == 'function' ? o.href.call($e[0]) : o.href);
+ }
+
+ Confirmation.prototype.getTarget = function () {
+ var $e = this.$element;
+ var o = this.options;
+
+ return $e.attr('data-target') || (typeof o.target == 'function' ? o.target.call($e[0]) : o.target);
+ }
+
+ Confirmation.prototype.isPopout = function () {
+ var popout;
+ var $e = this.$element;
+ var o = this.options;
+
+ popout = $e.attr('data-popout') || (typeof o.popout == 'function' ? o.popout.call($e[0]) : o.popout);
+
+ if(popout == 'false') popout = false;
+
+ return popout
+ }
+
+
+ // CONFIRMATION PLUGIN DEFINITION
+ // =========================
+ var old = $.fn.confirmation;
+
+ $.fn.confirmation = function (option) {
+ var that = this;
+
+ return this.each(function () {
+ var $this = $(this);
+ var data = $this.data('bs.confirmation');
+ var options = typeof option == 'object' && option;
+
+ options = options || {};
+ options.all_selector = that.selector;
+
+ if (!data && option == 'destroy') return;
+ if (!data) $this.data('bs.confirmation', (data = new Confirmation(this, options)));
+ if (typeof option == 'string') data[option]();
+ });
+ }
+
+ $.fn.confirmation.Constructor = Confirmation
+
+
+ // CONFIRMATION NO CONFLICT
+ // ===================
+ $.fn.confirmation.noConflict = function () {
+ $.fn.confirmation = old;
+
+ return this;
+ }
+}(jQuery);
+
+
+
+!function(){var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
+(function(){function S(a){function d(e){var b=e.charCodeAt(0);if(b!==92)return b;var a=e.charAt(1);return(b=r[a])?b:"0"<=a&&a<="7"?parseInt(e.substring(1),8):a==="u"||a==="x"?parseInt(e.substring(2),16):e.charCodeAt(1)}function g(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return e==="\\"||e==="-"||e==="]"||e==="^"?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),e=[],a=
+b[0]==="^",c=["["];a&&c.push("^");for(var a=a?1:0,f=b.length;a122||(l<65||h>90||e.push([Math.max(65,h)|32,Math.min(l,90)|32]),l<97||h>122||e.push([Math.max(97,h)&-33,Math.min(l,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];f=[];for(a=0;ah[0]&&(h[1]+1>h[0]&&c.push("-"),c.push(g(h[1])));c.push("]");return c.join("")}function s(e){for(var a=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],f=0,h=0;f=2&&e==="["?a[f]=b(l):e!=="\\"&&(a[f]=l.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var x=0,m=!1,j=!1,k=0,c=a.length;k=5&&"lang-"===w.substring(0,5))&&!(t&&typeof t[1]==="string"))f=!1,w="src";f||(r[z]=w)}h=c;c+=z.length;if(f){f=t[1];var l=z.indexOf(f),B=l+f.length;t[2]&&(B=z.length-t[2].length,l=B-f.length);w=w.substring(5);H(j+h,z.substring(0,l),g,k);H(j+h+l,f,I(w,f),k);H(j+h+B,z.substring(B),g,k)}else k.push(j+h,w)}a.g=k}var b={},s;(function(){for(var g=a.concat(d),j=[],k={},c=0,i=g.length;c=0;)b[n.charAt(e)]=r;r=r[1];n=""+r;k.hasOwnProperty(n)||(j.push(r),k[n]=q)}j.push(/[\S\s]/);s=S(j)})();var x=d.length;return g}function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
+q,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&g.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),g.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,q])):d.push(["com",
+/^#[^\n\r]*/,q,"#"]));a.cStyleComments&&(g.push(["com",/^\/\/[^\n\r]*/,q]),g.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));if(b=a.regexLiterals){var s=(b=b>1?"":"\n\r")?".":"[\\S\\s]";g.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+
+s+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&g.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&g.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),q]);d.push(["pln",/^\s+/,q," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");g.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,
+q],["pun",RegExp(b),q]);return C(d,g)}function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.className))if("br"===a.nodeName)s(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&g){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(j.createTextNode(d),a.nextSibling),s(a),c||a.parentNode.removeChild(a)}}function s(a){function b(a,c){var d=
+c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),g=a.nextSibling;e.appendChild(d);for(var i=g;i;i=g)g=i.nextSibling,e.appendChild(i)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var x=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,j=a.ownerDocument,k=j.createElement("li");a.firstChild;)k.appendChild(a.firstChild);for(var c=[k],i=0;i=0;){var b=d[g];F.hasOwnProperty(b)?D.console&&console.warn("cannot override language handler %s",b):F[b]=a}}function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\s*=l&&(b+=2);g>=B&&(r+=2)}}finally{if(f)f.style.display=h}}catch(u){D.console&&console.log(u&&u.stack||u)}}var D=window,y=["break,continue,do,else,for,if,return,while"],E=[[y,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
+"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],M=[E,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],N=[E,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],
+O=[N,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],E=[E,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],P=[y,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
+Q=[y,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],W=[y,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],y=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,
+V=/\S/,X=v({keywords:[M,O,E,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",P,Q,y],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};p(X,["default-code"]);p(C([],[["pln",/^[^]+/],["dec",/^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",
+/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^
+
{{if .Title}}{{.Title}} - {{end}}{{AppName}}
diff --git a/templates/repo/single.tmpl b/templates/repo/single.tmpl
index c83723446a07..b5207d08202d 100644
--- a/templates/repo/single.tmpl
+++ b/templates/repo/single.tmpl
@@ -79,11 +79,11 @@
-
- README.md
+
+ README.md
-
- httplib
+
+ markdown content