From 4d2daa048fbfea73aca3814c84353200a19c2bc1 Mon Sep 17 00:00:00 2001 From: naoki hirata Date: Mon, 20 Jan 2014 18:31:29 +0900 Subject: [PATCH] =?utf8?q?=E7=AE=A1=E7=90=86=E7=94=BB=E9=9D=A2=E3=81=AB?= =?utf8?q?=E5=85=88=E9=A0=AD=E3=81=B8=E8=87=AA=E5=8B=95=E3=82=B9=E3=82=AF?= =?utf8?q?=E3=83=AD=E3=83=BC=E3=83=AB=E3=81=99=E3=82=8B=E6=A9=9F=E8=83=BD?= =?utf8?q?=E3=82=92=E8=BF=BD=E5=8A=A0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- images/system/gotop48.png | Bin 0 -> 1360 bytes scripts/m3admin1.6.7.js | 210 +++++++++++++++++++++++++++++++--------------- 2 files changed, 143 insertions(+), 67 deletions(-) create mode 100644 images/system/gotop48.png diff --git a/images/system/gotop48.png b/images/system/gotop48.png new file mode 100644 index 0000000000000000000000000000000000000000..10faeef2a33f36427afd8b54203f845907a5cd10 GIT binary patch literal 1360 zcmV-W1+V&vP)mQCv^Y-1jR{2K~#90?V3+W99JC2KQr#m>}C%QiB=m;N?{XI z=%Ex*7P5Npp|^llH{xErQ>jb>02-u#Swny0be2Yam}3*m>{Gd%w^7z4x2<=B*+km{bIm0$%}TfC{7lg~CYz z_JO~FKY;(tnJ&}sGT;ZG`QZ0?lK_7K5nu?2r&C1`kltACg5j8q*6q-47C3Kez|`Ax~QruilT_B zss+6Oal748RaGUiSj_B&-$cZVh%_51&!0aRuh%Q2$J@EP>gwubeSO_9cU?sMDsbqR zrKKg}@wj8|*L9ssmo7P0-^-UTdHwpeaq9z0R7@cCakXOL?RJFp%B4fkdcuQDk>^$*Q+SX2^)`izzO+$J_ZH`2#3Rm zX|=VrjE;^Tk0Oppb+R&_&qsfMKh4d}C-Q>9AmiiXjzc&G;PH4E7#N_bsp-@*fk1$X zi3vv`90AZYjlsb|8XFt4maVC&VQOm1F$miLhVh|L$nrB)RaK4+CtCozt`m($GmiOe z3Iqa-jg8q3v3Ub%nnolNITCGhRWKOj(W6JUAo2q6csxX-QCr3vs;jHB^`6KXzzCI2 z7;mVywwAH6vApI)P5>7!TsSq(n{~Da&i*C-*43{>i~_7jalP-OG^t6A3n_J z0Zr2w9UbNN?b{gv4OLfH^Web)JRXlFyDS4_bM3u*_n4TNz~}Sf^?Fa_D~iJ9%a>VP zT%@6)fp_oTomy8}S()+26a zkxQpo2Do_fA^`XA->0{?H%Ak*D;A4UUtiDm_BN%ZrIxq1mH;$OV{2=RzP>(3d;YlQ z=jXY5_b$uJ%a+5aD|?Z&OQX>!tE;QF478%*;bCI27#kZKmdaZKNF)-xdGp4WVY$fk z?I)`o-P9LC9{~!jj{t?%M}R`haR9g5jjrn%^E6F!x;b2=Pd^;fvuDp}ZEZ!Ej;BY&1?b@{h+LB!* zB_-yM3khHy5&1?$k|H8IJ3G?Z*(t@v#RWf+JbvA{aYG(Ier!HwT@;Z|6cKR)zX0DE zXiuL$Wp#CxR4R2Y4!T_~7khCsk(5?#X0V}{F@DHY=;r{^=^AG0{ S1_BEJ0000 - * @copyright Copyright 2006-2013 Magic3 Project. + * @copyright Copyright 2006-2014 Magic3 Project. * @license http://www.gnu.org/copyleft/gpl.html GPL License * @version SVN: $Id$ * @link http://www.magic3.org @@ -464,77 +464,153 @@ function m3CancelSafeContentEdit() /** * 画面操作用スライド開閉メニューバー */ -(function($){ - $.fn.m3SlideMenubar = function(givenOpts){ - opts = $.extend({ - position: 'top', // panel position 'top' or 'bottom' - height: '80px', // set the height of the panel - speed: 'normal', // 'slow', 'normal', 'fast', or number in milliseconds - touchPanel: true, // mouse click operation than mouse hover - openBtn: '.m3open', // open button id or class inside 'slidetrigger' div - closeBtn: '.m3close', // close button id or class inside 'slidetrigger' div - slideTrigger: '#slidetrigger' // trigger id or class - }, givenOpts); +$.fn.m3SlideMenubar = function(givenOpts){ + opts = $.extend({ + position: 'top', // panel position 'top' or 'bottom' + height: '80px', // set the height of the panel + speed: 'normal', // 'slow', 'normal', 'fast', or number in milliseconds + touchPanel: true, // mouse click operation than mouse hover + openBtn: '.m3open', // open button id or class inside 'slidetrigger' div + closeBtn: '.m3close', // close button id or class inside 'slidetrigger' div + slideTrigger: '#slidetrigger' // trigger id or class + }, givenOpts); - // refers to the selector 'm3SlideMenubar' - var $this = $(this); + // refers to the selector 'm3SlideMenubar' + var $this = $(this); - // vars needed to pass args to animate method - var containerpadding; - var aniOpenArgs = {}; - var aniCloseArgs = {}; + // vars needed to pass args to animate method + var containerpadding; + var aniOpenArgs = {}; + var aniCloseArgs = {}; - // add appropriate class names based on position - if (opts.position == 'top') { - $this.addClass('top'); - $(opts.slideTrigger).addClass('top'); - containerpadding = 'top'; - } else { - $this.addClass('bottom'); - $(opts.slideTrigger).addClass('bottom'); - containerpadding = 'padding-bottom'; - }; + // add appropriate class names based on position + if (opts.position == 'top') { + $this.addClass('top'); + $(opts.slideTrigger).addClass('top'); + containerpadding = 'top'; + } else { + $this.addClass('bottom'); + $(opts.slideTrigger).addClass('bottom'); + containerpadding = 'padding-bottom'; + }; - // set panel's height - $this.css('height', opts.height); + // set panel's height + $this.css('height', opts.height); - // remove the 'px' from the height string so we can calculate the container padding - var newpadding = opts.height.replace("px",""); - newpadding = parseInt(opts.height) + 21; + // remove the 'px' from the height string so we can calculate the container padding + var newpadding = opts.height.replace("px",""); + newpadding = parseInt(opts.height) + 21; - aniOpenArgs[containerpadding] = newpadding; - aniCloseArgs[containerpadding] = 0; + aniOpenArgs[containerpadding] = newpadding; + aniCloseArgs[containerpadding] = 0; - if (opts.touchPanel){ - // slide panel in and container down - $(opts.openBtn).click(function(){ - $this.slideDown(opts.speed); - $(opts.slideTrigger).animate(aniOpenArgs, opts.speed); - $(opts.openBtn).css({'display':'none'}); - $(opts.closeBtn).css({'display':'inline'}); - return false; - }); - // slide panel out and container up - $(opts.closeBtn).click(function(){ - $this.slideUp(opts.speed); - $(opts.slideTrigger).animate(aniCloseArgs, opts.speed); - $(opts.openBtn).css({'display':'inline'}); - $(opts.closeBtn).css({'display':'none'}); - return false; - }); - } else { - // slide panel in and container down - $(opts.openBtn).mouseover(function(){ - $this.slideDown(opts.speed); - $(opts.slideTrigger).slideUp(opts.speed); - return false; - }); - // slide panel out and container up - $this.hover(function(){},function(){ - $this.slideUp(opts.speed); - $(opts.slideTrigger).slideDown(opts.speed); - return false; - }); + if (opts.touchPanel){ + // slide panel in and container down + $(opts.openBtn).click(function(){ + $this.slideDown(opts.speed); + $(opts.slideTrigger).animate(aniOpenArgs, opts.speed); + $(opts.openBtn).css({'display':'none'}); + $(opts.closeBtn).css({'display':'inline'}); + return false; + }); + // slide panel out and container up + $(opts.closeBtn).click(function(){ + $this.slideUp(opts.speed); + $(opts.slideTrigger).animate(aniCloseArgs, opts.speed); + $(opts.openBtn).css({'display':'inline'}); + $(opts.closeBtn).css({'display':'none'}); + return false; + }); + } else { + // slide panel in and container down + $(opts.openBtn).mouseover(function(){ + $this.slideDown(opts.speed); + $(opts.slideTrigger).slideUp(opts.speed); + return false; + }); + // slide panel out and container up + $this.hover(function(){},function(){ + $this.slideUp(opts.speed); + $(opts.slideTrigger).slideDown(opts.speed); + return false; + }); + } +}; +/* + * 初期処理 + */ +$(function(){ + //** jQuery Scroll to Top Control script- (c) Dynamic Drive DHTML code library: http://www.dynamicdrive.com. + //** Available/ usage terms at http://www.dynamicdrive.com (March 30th, 09') + //** v1.1 (April 7th, 09'): + //** 1) Adds ability to scroll to an absolute position (from top of page) or specific element on the page instead. + //** 2) Fixes scroll animation not working in Opera. + var scrolltotop={ + //startline: Integer. Number of pixels from top of doc scrollbar is scrolled before showing control + //scrollto: Keyword (Integer, or "Scroll_to_Element_ID"). How far to scroll document up when control is clicked on (0=top). + setting: {startline:100, scrollto: 0, scrollduration:1000, fadeduration:[500, 100]}, + controlHTML: '', //HTML for control, which is auto wrapped in DIV w/ ID="topcontrol" + controlattrs: {offsetx:5, offsety:5}, //offset of control relative to right/ bottom of window corner + anchorkeyword: '#top', //Enter href value of HTML anchors on the page that should also act as "Scroll Up" links + + state: {isvisible:false, shouldvisible:false}, + + scrollup:function(){ + if (!this.cssfixedsupport) //if control is positioned using JavaScript + this.$control.css({opacity:0}) //hide control immediately after clicking it + var dest=isNaN(this.setting.scrollto)? this.setting.scrollto : parseInt(this.setting.scrollto) + if (typeof dest=="string" && $('#'+dest).length==1) //check element set by string exists + dest=$('#'+dest).offset().top + else + dest=0 + this.$body.animate({scrollTop: dest}, this.setting.scrollduration); + }, + + keepfixed:function(){ + var $window=$(window) + var controlx=$window.scrollLeft() + $window.width() - this.$control.width() - this.controlattrs.offsetx + var controly=$window.scrollTop() + $window.height() - this.$control.height() - this.controlattrs.offsety + this.$control.css({left:controlx+'px', top:controly+'px'}) + }, + + togglecontrol:function(){ + var scrolltop=$(window).scrollTop() + if (!this.cssfixedsupport) + this.keepfixed() + this.state.shouldvisible=(scrolltop>=this.setting.startline)? true : false + if (this.state.shouldvisible && !this.state.isvisible){ + this.$control.stop().animate({opacity:1}, this.setting.fadeduration[0]) + this.state.isvisible=true + } + else if (this.state.shouldvisible==false && this.state.isvisible){ + this.$control.stop().animate({opacity:0}, this.setting.fadeduration[1]) + this.state.isvisible=false + } + }, + + init:function(){ + $(document).ready(function($){ + var mainobj=scrolltotop + var iebrws=document.all + mainobj.cssfixedsupport=!iebrws || iebrws && document.compatMode=="CSS1Compat" && window.XMLHttpRequest //not IE or IE7+ browsers in standards mode + mainobj.$body=(window.opera)? (document.compatMode=="CSS1Compat"? $('html') : $('body')) : $('html,body') + mainobj.$control=$('
'+mainobj.controlHTML+'
') + .css({position:mainobj.cssfixedsupport? 'fixed' : 'absolute', bottom:mainobj.controlattrs.offsety, right:mainobj.controlattrs.offsetx, opacity:0, cursor:'pointer'}) + .attr({title:'先頭へスクロール'}) + .click(function(){mainobj.scrollup(); return false}) + .appendTo('body') + if (document.all && !window.XMLHttpRequest && mainobj.$control.text()!='') //loose check for IE6 and below, plus whether control contains any text + mainobj.$control.css({width:mainobj.$control.width()}) //IE6- seems to require an explicit width on a DIV containing text + mainobj.togglecontrol() + $('a[href="' + mainobj.anchorkeyword +'"]').click(function(){ + mainobj.scrollup() + return false + }) + $(window).bind('scroll resize', function(e){ + mainobj.togglecontrol() + }) + }) } - }; -})(jQuery); + } + scrolltotop.init() +}); -- 2.11.0