From d1f18b94761426095d0e04079be67b3f92684ec2 Mon Sep 17 00:00:00 2001 From: iiuazz Date: Fri, 12 Sep 2014 21:46:03 +0800 Subject: [PATCH] v1.0-alpha release --- app/release/release.go | 7 ++- app/views/Note/note.html | 58 +++++++++++-------- public/js/all.js | 2 +- public/js/app/note-min.js | 2 +- public/js/app/notebook-min.js | 2 +- public/js/app/page-min.js | 2 +- public/js/app/share-min.js | 2 +- .../js/contextmenu/jquery.contextmenu-min.js | 2 +- 8 files changed, 45 insertions(+), 32 deletions(-) diff --git a/app/release/release.go b/app/release/release.go index 494c235..17c027a 100644 --- a/app/release/release.go +++ b/app/release/release.go @@ -33,7 +33,8 @@ var jss = []string{"js/jquery-cookie", "js/bootstrap", "js/common", "js/app/note", "js/app/tag", "js/app/notebook", "js/app/share", "js/object_id", "js/ZeroClipboard/ZeroClipboard"} -var base = "/Users/life/Documents/Go/package/src/github.com/leanote/leanote/public/" +var base1 = "/Users/life/Documents/Go/package2/src/github.com/leanote/leanote/" +var base = "/Users/life/Documents/Go/package2/src/github.com/leanote/leanote/public/" var cmdPath = "/usr/local/bin/uglifyjs" func cmdError(err error) { @@ -89,8 +90,8 @@ func dev() { "/public/mdeditor/editor/scrollLink.js": "/public/mdeditor/editor/scrollLink-min.js", "console.log(o);": "", } - path := "/Users/life/Documents/Go/package/src/github.com/leanote/leanote/src/views/note/note-dev.html" - target := "/Users/life/Documents/Go/package/src/github.com/leanote/leanote/src/views/note/note.html" + path := base1 + "/src/views/note/note-dev.html" + target := base1 + "/src/views/note/note.html" bs, _ := ioutil.ReadFile(path) content := string(bs) diff --git a/app/views/Note/note.html b/app/views/Note/note.html index 16ef436..9bb2def 100755 --- a/app/views/Note/note.html +++ b/app/views/Note/note.html @@ -13,6 +13,8 @@ + + - @@ -80,8 +81,11 @@ function log(o) { id="dropdownMenu2" data-toggle="dropdown"> - + @@ -98,12 +102,12 @@ function log(o) { - @@ -233,8 +237,12 @@ function log(o) { - + +
+ + + +
@@ -245,7 +253,7 @@ function log(o) {
-
-
@@ -312,19 +316,24 @@ function log(o) { + - + + @@ -978,11 +989,13 @@ initSlimScroll(); + @@ -990,7 +1003,6 @@ initSlimScroll(); - diff --git a/public/js/all.js b/public/js/all.js index 66bec02..00fed45 100644 --- a/public/js/all.js +++ b/public/js/all.js @@ -1,2 +1,2 @@ (function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else{factory(jQuery)}})(function($){var pluses=/\+/g;function encode(s){return config.raw?s:encodeURIComponent(s)}function decode(s){return config.raw?s:decodeURIComponent(s)}function stringifyCookieValue(value){return encode(config.json?JSON.stringify(value):String(value))}function parseCookieValue(s){if(s.indexOf('"')===0){s=s.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")}try{s=decodeURIComponent(s.replace(pluses," "));return config.json?JSON.parse(s):s}catch(e){}}function read(s,converter){var value=config.raw?s:parseCookieValue(s);return $.isFunction(converter)?converter(value):value}var config=$.cookie=function(key,value,options){if(value!==undefined&&!$.isFunction(value)){options=$.extend({},config.defaults,options);if(typeof options.expires==="number"){var days=options.expires,t=options.expires=new Date;t.setTime(+t+days*864e5)}return document.cookie=[encode(key),"=",stringifyCookieValue(value),options.expires?"; expires="+options.expires.toUTCString():"",options.path?"; path="+options.path:"",options.domain?"; domain="+options.domain:"",options.secure?"; secure":""].join("")}var result=key?undefined:{};var cookies=document.cookie?document.cookie.split("; "):[];for(var i=0,l=cookies.length;ithis.$items.length-1||pos<0)return;if(this.sliding)return this.$element.one("slid",function(){that.to(pos)});if(activeIndex==pos)return this.pause().cycle();return this.slide(pos>activeIndex?"next":"prev",$(this.$items[pos]))};Carousel.prototype.pause=function(e){e||(this.paused=true);if(this.$element.find(".next, .prev").length&&$.support.transition.end){this.$element.trigger($.support.transition.end);this.cycle(true)}this.interval=clearInterval(this.interval);return this};Carousel.prototype.next=function(){if(this.sliding)return;return this.slide("next")};Carousel.prototype.prev=function(){if(this.sliding)return;return this.slide("prev")};Carousel.prototype.slide=function(type,next){var $active=this.$element.find(".item.active");var $next=next||$active[type]();var isCycling=this.interval;var direction=type=="next"?"left":"right";var fallback=type=="next"?"first":"last";var that=this;if(!$next.length){if(!this.options.wrap)return;$next=this.$element.find(".item")[fallback]()}this.sliding=true;isCycling&&this.pause();var e=$.Event("slide.bs.carousel",{relatedTarget:$next[0],direction:direction});if($next.hasClass("active"))return;if(this.$indicators.length){this.$indicators.find(".active").removeClass("active");this.$element.one("slid",function(){var $nextIndicator=$(that.$indicators.children()[that.getActiveIndex()]);$nextIndicator&&$nextIndicator.addClass("active")})}if($.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(e);if(e.isDefaultPrevented())return;$next.addClass(type);$next[0].offsetWidth;$active.addClass(direction);$next.addClass(direction);$active.one($.support.transition.end,function(){$next.removeClass([type,direction].join(" ")).addClass("active");$active.removeClass(["active",direction].join(" "));that.sliding=false;setTimeout(function(){that.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{this.$element.trigger(e);if(e.isDefaultPrevented())return;$active.removeClass("active");$next.addClass("active");this.sliding=false;this.$element.trigger("slid")}isCycling&&this.cycle();return this};var old=$.fn.carousel;$.fn.carousel=function(option){return this.each(function(){var $this=$(this);var data=$this.data("bs.carousel");var options=$.extend({},Carousel.DEFAULTS,$this.data(),typeof option=="object"&&option);var action=typeof option=="string"?option:options.slide;if(!data)$this.data("bs.carousel",data=new Carousel(this,options));if(typeof option=="number")data.to(option);else if(action)data[action]();else if(options.interval)data.pause().cycle()})};$.fn.carousel.Constructor=Carousel;$.fn.carousel.noConflict=function(){$.fn.carousel=old;return this};$(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(e){var $this=$(this),href;var $target=$($this.attr("data-target")||(href=$this.attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,""));var options=$.extend({},$target.data(),$this.data());var slideIndex=$this.attr("data-slide-to");if(slideIndex)options.interval=false;$target.carousel(options);if(slideIndex=$this.attr("data-slide-to")){$target.data("bs.carousel").to(slideIndex)}e.preventDefault()});$(window).on("load",function(){$('[data-ride="carousel"]').each(function(){var $carousel=$(this);$carousel.carousel($carousel.data())})})}(jQuery);+function($){"use strict";var Collapse=function(element,options){this.$element=$(element);this.options=$.extend({},Collapse.DEFAULTS,options);this.transitioning=null;if(this.options.parent)this.$parent=$(this.options.parent);if(this.options.toggle)this.toggle()};Collapse.DEFAULTS={toggle:true};Collapse.prototype.dimension=function(){var hasWidth=this.$element.hasClass("width");return hasWidth?"width":"height"};Collapse.prototype.show=function(){if(this.transitioning||this.$element.hasClass("in"))return;var startEvent=$.Event("show.bs.collapse");this.$element.trigger(startEvent);if(startEvent.isDefaultPrevented())return;var actives=this.$parent&&this.$parent.find("> .panel > .in");if(actives&&actives.length){var hasData=actives.data("bs.collapse");if(hasData&&hasData.transitioning)return;actives.collapse("hide");hasData||actives.data("bs.collapse",null)}var dimension=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[dimension](0);this.transitioning=1;var complete=function(){this.$element.removeClass("collapsing").addClass("in")[dimension]("auto");this.transitioning=0;this.$element.trigger("shown.bs.collapse")};if(!$.support.transition)return complete.call(this);var scrollSize=$.camelCase(["scroll",dimension].join("-"));this.$element.one($.support.transition.end,$.proxy(complete,this)).emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize])};Collapse.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("in"))return;var startEvent=$.Event("hide.bs.collapse");this.$element.trigger(startEvent);if(startEvent.isDefaultPrevented())return;var dimension=this.dimension();this.$element[dimension](this.$element[dimension]())[0].offsetHeight;this.$element.addClass("collapsing").removeClass("collapse").removeClass("in");this.transitioning=1;var complete=function(){this.transitioning=0;this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};if(!$.support.transition)return complete.call(this);this.$element[dimension](0).one($.support.transition.end,$.proxy(complete,this)).emulateTransitionEnd(350)};Collapse.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var old=$.fn.collapse;$.fn.collapse=function(option){return this.each(function(){var $this=$(this);var data=$this.data("bs.collapse");var options=$.extend({},Collapse.DEFAULTS,$this.data(),typeof option=="object"&&option);if(!data)$this.data("bs.collapse",data=new Collapse(this,options));if(typeof option=="string")data[option]()})};$.fn.collapse.Constructor=Collapse;$.fn.collapse.noConflict=function(){$.fn.collapse=old;return this};$(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(e){var $this=$(this),href;var target=$this.attr("data-target")||e.preventDefault()||(href=$this.attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,"");var $target=$(target);var data=$target.data("bs.collapse");var option=data?"toggle":$this.data();var parent=$this.attr("data-parent");var $parent=parent&&$(parent);if(!data||!data.transitioning){if($parent)$parent.find('[data-toggle=collapse][data-parent="'+parent+'"]').not($this).addClass("collapsed");$this[$target.hasClass("in")?"addClass":"removeClass"]("collapsed")}$target.collapse(option)})}(jQuery);+function($){"use strict";var backdrop=".dropdown-backdrop";var toggle="[data-toggle=dropdown]";var Dropdown=function(element){var $el=$(element).on("click.bs.dropdown",this.toggle)};Dropdown.prototype.toggle=function(e){var $this=$(this);if($this.is(".disabled, :disabled"))return;var $parent=getParent($this);var isActive=$parent.hasClass("open");clearMenus();if(!isActive){if("ontouchstart"in document.documentElement&&!$parent.closest(".navbar-nav").length){$('");MarkdownEditor.refreshPreview()}else{setTimeout(function(){setEditorContent(content,true,preview)},200)}}}}function previewIsEmpty(preview){if(!preview||preview.substr(0,previewToken.length)==previewToken){return true}return false}function getEditorContent(isMarkdown){if(!isMarkdown){var editor=tinymce.activeEditor;if(editor){var content=$(editor.getBody());content.find("pinit").remove();content.find(".thunderpin").remove();content.find(".pin").parent().remove();content=$(content).html();if(content){while(true){var lastEndScriptPos=content.lastIndexOf("");if(lastEndScriptPos==-1){return content}var length=content.length;if(length-9==lastEndScriptPos){var lastScriptPos=content.lastIndexOf("");if(lastEndScriptPos==-1){return content}var length=content.length;if(length-9==lastEndScriptPos){var lastScriptPos=content.lastIndexOf("