5px; text-align: left; } #upload .filelist li p.progress { position: absolute; width: 100%; bottom: 0; left: 0; height: 8px; overflow: hidden; z-index: 50; margin: 0; border-radius: 0; background: none; -webkit-box-shadow: 0 0 0; } #upload .filelist li p.progress span { display: none; overflow: hidden; width: 0; height: 100%; background: #1483d8 url(./images/progress.png) repeat-x; -webit-transition: width 200ms linear; -moz-transition: width 200ms linear; -o-transition: width 200ms linear; -ms-transition: width 200ms linear; transition: width 200ms linear; -webkit-animation: progressmove 2s linear infinite; -moz-animation: progressmove 2s linear infinite; -o-animation: progressmove 2s linear infinite; -ms-animation: progressmove 2s linear infinite; animation: progressmove 2s linear infinite; -webkit-transform: translateZ(0); } @-webkit-keyframes progressmove { 0% { background-position: 0 0; } 100% { background-position: 17px 0; } } @-moz-keyframes progressmove { 0% { background-position: 0 0; } 100% { background-position: 17px 0; } } @keyframes progressmove { 0% { background-position: 0 0; } 100% { background-position: 17px 0; } } #upload .filelist li p.imgWrap { position: relative; z-index: 2; line-height: 113px; vertical-align: middle; overflow: hidden; width: 113px; height: 113px; -webkit-transform-origin: 50% 50%; -moz-transform-origin: 50% 50%; -o-transform-origin: 50% 50%; -ms-transform-origin: 50% 50%; transform-origin: 50% 50%; -webit-transition: 200ms ease-out; -moz-transition: 200ms ease-out; -o-transition: 200ms ease-out; -ms-transition: 200ms ease-out; transition: 200ms ease-out; } #upload .filelist li img { width: 100%; } #upload .filelist li p.error { background: #f43838; color: #fff; position: absolute; bottom: 0; left: 0; height: 28px; line-height: 28px; width: 100%; z-index: 100; display:none; } #upload .filelist li .success { display: block; position: absolute; left: 0; bottom: 0; height: 40px; width: 100%; z-index: 200; background: url(./images/success.png) no-repeat right bottom; background: url(./images/success.gif) no-repeat right bottom \9; } #upload .filelist li.filePickerBlock { width: 113px; height: 113px; background: url(./images/image.png) no-repeat center 12px; border: 1px solid #eeeeee; border-radius: 0; } #upload .filelist li.filePickerBlock div.webuploader-pick { width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; background: none; font-size: 0; } #upload .filelist div.file-panel { position: absolute; height: 0; filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#80000000', endColorstr='#80000000') \0; background: rgba(0, 0, 0, 0.5); width: 100%; top: 0; left: 0; overflow: hidden; z-index: 300; } #upload .filelist div.file-panel span { width: 24px; height: 24px; display: inline; float: right; text-indent: -9999px; overflow: hidden; background: url(./images/icons.png) no-repeat; background: url(./images/icons.gif) no-repeat \9; margin: 5px 1px 1px; cursor: pointer; -webkit-tap-highlight-color: rgba(0,0,0,0); -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } #upload .filelist div.file-panel span.rotateLeft { display:none; background-position: 0 -24px; } #upload .filelist div.file-panel span.rotateLeft:hover { background-position: 0 0; } #upload .filelist div.file-panel span.rotateRight { display:none; background-position: -24px -24px; } #upload .filelist div.file-panel span.rotateRight:hover { background-position: -24px 0; } #upload .filelist div.file-panel span.cancel { background-position: -48px -24px; } #upload .filelist div.file-panel span.cancel:hover { background-position: -48px 0; } #upload .statusBar { height: 45px; border-bottom: 1px solid #dadada; margin: 0 10px; padding: 0; line-height: 45px; vertical-align: middle; position: relative; } #upload .statusBar .progress { border: 1px solid #1483d8; width: 198px; background: #fff; height: 18px; position: absolute; top: 12px; display: none; text-align: center; line-height: 18px; color: #6dbfff; margin: 0 10px 0 0; } #upload .statusBar .progress span.percentage { width: 0; height: 100%; left: 0; top: 0; background: #1483d8; position: absolute; } #upload .statusBar .progress span.text { position: relative; z-index: 10; } #upload .statusBar .info { display: inline-block; font-size: 14px; color: #666666; } #upload .statusBar .btns { position: absolute; top: 7px; right: 0; line-height: 30px; } #filePickerBtn { display: inline-block; float: left; } #upload .statusBar .btns .webuploader-pick, #upload .statusBar .btns .uploadBtn, #upload .statusBar .btns .uploadBtn.state-uploading, #upload .statusBar .btns .uploadBtn.state-paused { background: #ffffff; border: 1px solid #cfcfcf; color: #565656; padding: 0 18px; display: inline-block; border-radius: 3px; margin-left: 10px; cursor: pointer; font-size: 14px; float: left; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } #upload .statusBar .btns .webuploader-pick-hover, #upload .statusBar .btns .uploadBtn:hover, #upload .statusBar .btns .uploadBtn.state-uploading:hover, #upload .statusBar .btns .uploadBtn.state-paused:hover { background: #f0f0f0; } #upload .statusBar .btns .uploadBtn, #upload .statusBar .btns .uploadBtn.state-paused{ background: #00b7ee; color: #fff; border-color: transparent; } #upload .statusBar .btns .uploadBtn:hover, #upload .statusBar .btns .uploadBtn.state-paused:hover{ background: #00a2d4; } #upload .statusBar .btns .uploadBtn.disabled { pointer-events: none; filter:alpha(opacity=60); -moz-opacity:0.6; -khtml-opacity: 0.6; opacity: 0.6; } /* 图片管理样式 */ #online { width: 100%; height: 336px; padding: 10px 0 0 0; } #online #imageList{ width: 100%; height: 100%; overflow-x: hidden; overflow-y: auto; position: relative; } #online ul { display: block; list-style: none; margin: 0; padding: 0; } #online li { float: left; display: block; list-style: none; padding: 0; width: 113px; height: 113px; margin: 0 0 9px 9px; *margin: 0 0 6px 6px; background-color: #eee; overflow: hidden; cursor: pointer; position: relative; } #online li.clearFloat { float: none; clear: both; display: block; width:0; height:0; margin: 0; padding: 0; } #online li img { cursor: pointer; } #online li .icon { cursor: pointer; width: 113px; height: 113px; position: absolute; top: 0; left: 0; z-index: 2; border: 0; background-repeat: no-repeat; } #online li .icon:hover { width: 107px; height: 107px; border: 3px solid #1094fa; } #online li.selected .icon { background-image: url(images/success.png); background-image: url(images/success.gif)\9; background-position: 75px 75px; } #online li.selected .icon:hover { width: 107px; height: 107px; border: 3px solid #1094fa; background-position: 72px 72px; } /* 图片搜索样式 */ #search .searchBar { width: 100%; height: 30px; margin: 10px 0 5px 0; padding: 0; } #search input.text{ width: 150px; padding: 3px 6px; font-size: 14px; line-height: 1.42857143; color: #555; background-color: #fff; background-image: none; border: 1px solid #ccc; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; } #search input.text:focus { border-color: #66afe9; outline: 0; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6); } #search input.searchTxt { margin-left:5px; padding-left: 5px; background: #FFF; width: 300px; *width: 260px; height: 21px; line-height: 21px; float: left; dislay: block; } #search .searchType { width: 65px; height: 28px; padding:0; line-height: 28px; border: 1px solid #d7d7d7; border-radius: 0; vertical-align: top; margin-left: 5px; float: left; dislay: block; } #search #searchBtn, #search #searchReset { display: inline-block; margin-bottom: 0; margin-right: 5px; padding: 4px 10px; font-weight: 400; text-align: center; vertical-align: middle; cursor: pointer; background-image: none; border: 1px solid transparent; white-space: nowrap; font-size: 14px; border-radius: 4px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; vertical-align: top; float: right; } #search #searchBtn { color: white; border-color: #285e8e; background-color: #3b97d7; } #search #searchReset { color: #333; border-color: #ccc; background-color: #fff; } #search #searchBtn:hover { background-color: #3276b1; } #search #searchReset:hover { background-color: #eee; } #search .msg { margin-left: 5px; } #search .searchList{ width: 100%; height: 300px; overflow: hidden; clear: both; } #search .searchList ul{ margin:0; padding:0; list-style:none; clear: both; width: 100%; height: 100%; overflow-x: hidden; overflow-y: auto; zoom: 1; position: relative; } #search .searchList li { list-style:none; float: left; display: block; width: 115px; margin: 5px 10px 5px 20px; *margin: 5px 10px 5px 15px; padding:0; font-size: 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, .3); -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, .3); position: relative; vertical-align: top; text-align: center; overflow: hidden; cursor: pointer; filter: alpha(Opacity=100); -moz-opacity: 1; opacity: 1; border: 2px solid #eee; } #search .searchList li.selected { filter: alpha(Opacity=40); -moz-opacity: 0.4; opacity: 0.4; border: 2px solid #00a0e9; } #search .searchList li p { background-color: #eee; margin: 0; padding: 0; position: relative; width:100%; height:115px; overflow: hidden; } #search .searchList li p img { cursor: pointer; border: 0; } #search .searchList li a { color: #999; border-top: 1px solid #F2F2F2; background: #FAFAFA; text-align: center; display: block; padding: 0 5px; width: 105px; height:32px; line-height:32px; white-space:nowrap; text-overflow:ellipsis; text-decoration: none; overflow: hidden; word-break: break-all; } #search .searchList a:hover { text-decoration: underline; color: #333; } #search .searchList .clearFloat{ clear: both; } suryee - Gogs: Go Git Service

赛亿官网

huwhois cf9f223ce1 初始化 %!s(int64=3) %!d(string=hace) años
..
5.0.6 cf9f223ce1 初始化 %!s(int64=3) %!d(string=hace) años
ekexiu.app - Gogs: Go Git Service

暂无描述

chats.html 25KB

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> <title></title> <link href="../css/mui.min.css" rel="stylesheet" /> <link rel="stylesheet" type="text/css" href="../css/app.css" /> <link href="../css/iconfont.css" rel="stylesheet" /> <link href="../css/mui.imageviewer.css" rel="stylesheet" /> <style> html, body { height: 100%; margin: 0px; padding: 0px; overflow: hidden; -webkit-touch-callout: none; -webkit-user-select: none; } footer { position: fixed; width: 100%; height: 50px; min-height: 50px; border-top: solid 1px #bbb; left: 0px; bottom: 0px; overflow: hidden; padding: 0px 50px; background-color: #fafafa; } .footer-left { position: absolute; width: 50px; height: 50px; left: 0px; bottom: 0px; text-align: center; vertical-align: middle; line-height: 100%; padding: 12px 4px; } .footer-right { position: absolute; width: 50px; height: 50px; right: 0px; bottom: 0px; text-align: center; vertical-align: middle; line-height: 100%; padding: 12px 5px; display: inline-block; } .footer-center { height: 100%; padding: 5px 0px; } .footer-center [class*=input] { width: 100%; height: 100%; border-radius: 5px; } .footer-center .input-text { background: #fff; border: solid 1px #ddd; padding: 10px !important; font-size: 16px !important; line-height: 18px !important; font-family: verdana !important; overflow: hidden; } .footer-center .input-sound { background-color: #eee; } .mui-content { height: 100%; padding: 44px 0px 50px 0px; overflow: auto; background-color: #eaeaea; } #msg-list { height: 83%; overflow: auto; -webkit-overflow-scrolling: touch; } .msg-item { padding: 8px; clear: both; } .msg-item .mui-item-clear { clear: both; } .msg-item .msg-user { width: 38px; height: 38px; /*border: solid 1px #d3d3d3;*/ display: inline-block; background: #fff; border-radius: 3px; vertical-align: top; text-align: center; float: left; /*padding: 3px;*/ color: #ddd; } .msg-item .msg-user-img{ width: 38px; height: 38px; display: inline-block; border-radius: 3px; vertical-align: top; text-align: center; float: left; color: #ddd; } .msg-item .msg-content { display: inline-block; border-radius: 5px; border: solid 1px #E3E3E3; background-color: #FFFFFF; color: #333; padding: 8px; vertical-align: top; font-size: 15px; position: relative; margin: 0px 8px; max-width: 75%; min-width: 35px; float: left; } .msg-item .msg-content .msg-content-inner { overflow-x: hidden; } .msg-item .msg-content .msg-content-arrow { position: absolute; border: solid 1px #E3E3E3; border-right: none; border-top: none; background-color: #FFFFFF; width: 10px; height: 10px; left: -5px; top: 12px; -webkit-transform: rotateZ(45deg); transform: rotateZ(45deg); } .msg-item-self .msg-user, .msg-item-self .msg-content { float: right; } .msg-item-self .msg-content .msg-content-arrow { left: auto; right: -5px; -webkit-transform: rotateZ(225deg); transform: rotateZ(225deg); } .msg-item-self .msg-content, .msg-item-self .msg-content .msg-content-arrow { background-color: #0ee032; color: #fff; border-color: #0ee032; } footer .mui-icon { color: #999999; } footer .mui-icon:active { color: #FF9900 !important; }/*#007AFF*/ footer .mui-icon-paperplane:before { content: "发送"; } footer .mui-icon-paperplane { /*-webkit-transform: rotateZ(45deg); transform: rotateZ(45deg);*/ font-size: 16px; word-break: keep-all; line-height: 100%; padding-top: 6px; color: rgba(0, 135, 250, 1); } #msg-sound { -webkit-user-select: none !important; user-select: none !important; } .rprogress { position: absolute; left: 50%; top: 50%; width: 140px; height: 140px; margin-left: -70px; margin-top: -70px; background-image: url(../images/arecord.png); background-repeat: no-repeat; background-position: center center; background-size: 30px 30px; background-color: rgba(0, 0, 0, 0.7); border-radius: 5px; display: none; -webkit-transition: .15s; } .rschedule { background-color: rgba(0, 0, 0, 0); border: 5px solid rgba(0, 183, 229, 0.9); opacity: .9; border-left: 5px solid rgba(0, 0, 0, 0); border-right: 5px solid rgba(0, 0, 0, 0); border-radius: 50px; box-shadow: 0 0 15px #2187e7; width: 46px; height: 46px; position: absolute; left: 50%; top: 50%; margin-left: -23px; margin-top: -23px; -webkit-animation: spin 1s infinite linear; animation: spin 1s infinite linear; } .r-sigh{ display: none; border-radius: 50px; box-shadow: 0 0 15px #2187e7; width: 46px; height: 46px; position: absolute; left: 50%; top: 50%; margin-left: -23px; margin-top: -23px; text-align: center; line-height: 46px; font-size: 40px; font-weight: bold; color: #2187e7; } .rprogress-sigh{ background-image: none !important; } .rprogress-sigh .rschedule{ display: none !important; } .rprogress-sigh .r-sigh{ display: block !important; } .rsalert { font-size: 12px; color: #bbb; text-align: center; position: absolute; border-radius: 5px; width: 130px; margin: 5px 5px; padding: 5px; left: 0px; bottom: 0px; } @-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } #h { background: #fff; border: solid 1px #ddd; padding: 10px !important; font-size: 16px !important; font-family: verdana !important; line-height: 18px !important; overflow: visible; position: absolute; left: -1000px; right: 0px; word-break: break-all; word-wrap: break-word; } .cancel { background-color: darkred; } .displayNone { display: none; } #consultCon { margin: -11px 15px -11px; } #lookConBtn { text-align: center; font-size: 12px; } /*待评价开始*/ .frmbtn1 { border:1px solid red; border-radius:6px; color:red; } .frmbtn1.mui-btn:enabled:active{ background: red; color: #fff; } /*待评价结束*/ </style> </head> <body contextmenu="return false;"> <header class="mui-bar mui-bar-nav toptitbox"> <span class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback" id="backBtn"> <a href="consultlist.html"></a> </span> <h1 class="mui-title toptit" id="chatName"></h1> <!--<span class="mui-icon mui-icon-contact mui-pull-right personhead"></span>--> </header> <pre id='h'></pre> <script id='msg-template' type="text/template"> <% for(var i in record){ var item=record[i]; %> <div class="msg-item <%= (item.sender=='self'?' msg-item-self':'') %>" msg-type='<%=(item.type)%>' msg-content='<%=(item.content)%>'> <!--对话内容渲染--> <% if(item.sender=='self' ) { %> <!--<i class="msg-user mui-icon mui-icon-person"></i>--> <img class="msg-user msg-user-img" src="<%=(item.imgurl)%>" alt="" id="selfImg"/> <% } else { %> <img class="msg-user msg-user-img" src="<%=(item.imgurl)%>"alt="" id="thatImg"/> <% } %> <div class="msg-content"> <div class="msg-content-inner"> <% if(item.type=='text' ) { %> <%=( item.content|| '&nbsp;&nbsp;') %> <% } else if(item.type=='image' ) { %> <img class="msg-content-image" src="<%=(item.content)%>" style="max-width: 100px;" /> <% } else if(item.type=='sound' ) { %> <span class="mui-icon mui-icon-mic" style="font-size: 18px;font-weight: bold;"></span> <span class="play-state">点击播放</span> <% } %> </div> <div class="msg-content-arrow"></div> </div> <div class="mui-item-clear"></div> </div> <% } %> </script> <div class="mui-content"> <div class="displayNone" id="status"></div> <div class="operatebox"> <div class="themespan mui-pull-left"> <span class="" id="consultTitle"> </span> </div> <!--我的需求,进行中--> <div class="operatebtnbox mui-pull-right displayNone" id="confirm"> <button class="mui-btn mui-btn-block mui-btn-outlined frmbtn operatebtn" id="confirmBtn" >点击确认完成咨询</button> </div> <!--我的需求,未评价--> <div class="operatebtnbox mui-pull-right displayNone" id="assessBtn"> <button class="mui-btn mui-btn-block mui-btn-outlined frmbtn1 operatebtn" style="width:80px;">去评价</button> </div> <!--我的需求,已评价--> <div class="operatebtnbox mui-pull-right operated displayNone" id="assessed"> <div class="evabox" id="myNeeAss"> <span>已评价</span> <div class="levelbox" id="my_starContainer"> <span class="mui-icon iconfont icon-favor"></span> <!--无色星星icon-favor 黄色星icon-favorfill--> <span class="mui-icon iconfont icon-favor"></span> <span class="mui-icon iconfont icon-favor"></span> <span class="mui-icon iconfont icon-favor"></span> <span class="mui-icon iconfont icon-favor"></span> </div> </div> </div> <!--收到咨询,对方未评价--> <div class="operatebtnbox mui-pull-right displayNone" style="width:30%;" id="that_weiassess"> <div class="evabox"><span>对方还未评价</span></div> </div> <!--收到咨询,进行中--> <div class="operatebtnbox mui-pull-right displayNone" id="waying" style="width:30%;"> <!--<div class="evabox"><span>进行中</span></div>--> </div> <!--收到咨询,对方已评价--> <div class="operatebtnbox mui-pull-right operated displayNone" id="that_assessed" style="cursor: pointer;"> <div class="evabox" id="getConAss"> <span>对方已评价</span> <div class="levelbox" id="consult_starContainer"> <span class="mui-icon iconfont icon-favor"></span> <!--无色星星icon-favor 黄色星icon-favorfill--> <span class="mui-icon iconfont icon-favor"></span> <span class="mui-icon iconfont icon-favor"></span> <span class="mui-icon iconfont icon-favor"></span> <span class="mui-icon iconfont icon-favor"></span> </div> </div> </div> </div> <div class="consult_content"> <ul class="mui-table-view" > <li class="mui-table-view-cell mui-collapse" id="mui-active" style="background-color:#fff;border-top:1px solid #f0f0f0;border-top:1px solid #f0f0f0;"> <div class="mui-collapse-content" id="consultCon"> 可以在折叠面板中放置任何内容;折叠面板默认收缩,若希望某个面板默认展开, 只需要在包含.mui-collapse类的li节点上,增加.mui-active类即可;mui官网中的方法说明, 使用的就是折叠面板控件。 </div> <a class="mui-navigate-right" href="#" id="lookConBtn">查看咨询内容</a> </li> </ul> </div> <div id='msg-list'> </div> </div> <footer class="" id="chatFooter"> <!--<div class="footer-left"> <i id='msg-image' class="mui-icon mui-icon-camera" style="font-size: 28px;"></i> </div>--> <div class="footer-center"> <textarea id='msg-text' type="text" class='input-text'></textarea> <button id='msg-sound' type="button" class='input-sound' style="display: none;">按住说话</button> </div> <label for="" class="footer-right"> <i id='msg-type' class="mui-icon mui-icon-paperplane"></i> </label> </footer> <div id='sound-alert' class="rprogress"> <div class="rschedule"></div> <div class="r-sigh">!</div> <div id="audio_tips" class="rsalert">手指上滑,取消发送</div> </div> <script src="../js/public/mui.min.js"></script> <script src="../js/public/base.js"></script> <script src="../js/public/mui.imageViewer.js"></script> <script src="../js/public/arttmpl.js"></script> <script type="text/javascript" src="../js/chats.js"></script> <script type="text/javascript" charset="utf-8"> /*mui.init({ swipeBack: true //启用右滑关闭功能 });*/ /*mui('.mui-scroll-wrapper').scroll(); mui('body').on('shown', '.mui-popover', function(e) { //console.log('shown', e.detail.id);//detail为当前popover元素 console.log('shown'); }); mui('body').on('hidden', '.mui-popover', function(e) { //console.log('hidden', e.detail.id);//detail为当前popover元素 });*/ /*(function($, doc) { var MIN_SOUND_TIME = 800; $.init({ gestureConfig: { tap: true, //默认为true doubletap: true, //默认为false longtap: true, //默认为false swipe: true, //默认为true drag: true, //默认为true hold: true, //默认为false,不监听 release: true //默认为false,不监听 } }); template.config('escape', false); //$.plusReady=function(fn){fn();}; $.plusReady(function() { plus.webview.currentWebview().setStyle({ softinputMode: "adjustResize" }); var showKeyboard = function() { if ($.os.ios) { var webView = plus.webview.currentWebview().nativeInstanceObject(); webView.plusCallMethod({ "setKeyboardDisplayRequiresUserAction": false }); } else { var Context = plus.android.importClass("android.content.Context"); var InputMethodManager = plus.android.importClass("android.view.inputmethod.InputMethodManager"); var main = plus.android.runtimeMainActivity(); var imm = main.getSystemService(Context.INPUT_METHOD_SERVICE); imm.toggleSoftInput(0, InputMethodManager.SHOW_FORCED); //var view = ((ViewGroup)main.findViewById(android.R.id.content)).getChildAt(0); imm.showSoftInput(main.getWindow().getDecorView(), InputMethodManager.SHOW_IMPLICIT); //alert("ll"); } }; var record = [{ sender: 'zs', type: 'text', content: 'Hi,我是 科袖 小管家!' }]; var ui = { body: doc.querySelector('body'), footer: doc.querySelector('footer'), footerRight: doc.querySelector('.footer-right'), footerLeft: doc.querySelector('.footer-left'), btnMsgType: doc.querySelector('#msg-type'), boxMsgText: doc.querySelector('#msg-text'), boxMsgSound: doc.querySelector('#msg-sound'), btnMsgImage: doc.querySelector('#msg-image'), areaMsgList: doc.querySelector('#msg-list'), boxSoundAlert: doc.querySelector('#sound-alert'), h: doc.querySelector('#h'), content: doc.querySelector('.mui-content') }; ui.h.style.width = ui.boxMsgText.offsetWidth+'px'; //alert(ui.boxMsgText.offsetWidth ); var footerPadding = ui.footer.offsetHeight - ui.boxMsgText.offsetHeight; var msgItemTap = function(msgItem, event) { var msgType = msgItem.getAttribute('msg-type'); var msgContent = msgItem.getAttribute('msg-content') if (msgType == 'sound') { player = plus.audio.createPlayer(msgContent); var playState = msgItem.querySelector('.play-state'); playState.innerText = '正在播放...'; player.play(function() { playState.innerText = '点击播放'; }, function(e) { playState.innerText = '点击播放'; }); } }; var imageViewer = new $.ImageViewer('.msg-content-image', { dbl: false }); var bindMsgList = function() { //绑定数据: // tp.bind({ // template: 'msg-template', // element: 'msg-list', // model: record // }); ui.areaMsgList.innerHTML = template('msg-template', { "record": record }); var msgItems = ui.areaMsgList.querySelectorAll('.msg-item'); [].forEach.call(msgItems, function(item, index) { item.addEventListener('tap', function(event) { msgItemTap(item, event); }, false); }); imageViewer.findAllImage(); ui.areaMsgList.scrollTop = ui.areaMsgList.scrollHeight + ui.areaMsgList.offsetHeight; }; bindMsgList(); window.addEventListener('resize', function() { ui.areaMsgList.scrollTop = ui.areaMsgList.scrollHeight + ui.areaMsgList.offsetHeight; }, false); var send = function(msg) { record.push(msg); bindMsgList(); toRobot(msg.content); }; var toRobot = function(info) { var apiUrl = 'http://www.tuling123.com/openapi/api'; // var apiUrl = baseUrl+'/ajax/tidings/qacon'; $.getJSON(apiUrl, { "key": 'acfbca724ea1b5db96d2eef88ce677dc', "info": info, "userid": plus.device.uuid }, function(data) { //alert(JSON.stringify(data)); record.push({ sender: 'zs', type: 'text', content: data.text }); bindMsgList(); }); }; function msgTextFocus() { ui.boxMsgText.focus(); setTimeout(function() { ui.boxMsgText.focus(); }, 150); } //解决长按“发送”按钮,导致键盘关闭的问题; ui.footerRight.addEventListener('touchstart', function(event) { if (ui.btnMsgType.classList.contains('mui-icon-paperplane')) { msgTextFocus(); event.preventDefault(); } }); //解决长按“发送”按钮,导致键盘关闭的问题; ui.footerRight.addEventListener('touchmove', function(event) { if (ui.btnMsgType.classList.contains('mui-icon-paperplane')) { msgTextFocus(); event.preventDefault(); } }); // ui.footerRight.addEventListener('touchcancel', function(event) { // if (ui.btnMsgType.classList.contains('mui-icon-paperplane')) { // msgTextFocus(); // event.preventDefault(); // } // }); // ui.footerRight.addEventListener('touchend', function(event) { // if (ui.btnMsgType.classList.contains('mui-icon-paperplane')) { // msgTextFocus(); // event.preventDefault(); // } // }); ui.footerRight.addEventListener('release', function(event) { if (ui.btnMsgType.classList.contains('mui-icon-paperplane')) { //showKeyboard(); ui.boxMsgText.focus(); setTimeout(function() { ui.boxMsgText.focus(); }, 150); // event.detail.gesture.preventDefault(); send({ sender: 'self', type: 'text', content: ui.boxMsgText.value.replace(new RegExp('\n', 'gm'), '<br/>') }); ui.boxMsgText.value = ''; $.trigger(ui.boxMsgText, 'input', null); } else if (ui.btnMsgType.classList.contains('mui-icon-mic')) { ui.btnMsgType.classList.add('mui-icon-compose'); ui.btnMsgType.classList.remove('mui-icon-mic'); ui.boxMsgText.style.display = 'none'; ui.boxMsgSound.style.display = 'block'; ui.boxMsgText.blur(); document.body.focus(); } else if (ui.btnMsgType.classList.contains('mui-icon-compose')) { ui.btnMsgType.classList.add('mui-icon-mic'); ui.btnMsgType.classList.remove('mui-icon-compose'); ui.boxMsgSound.style.display = 'none'; ui.boxMsgText.style.display = 'block'; //-- //showKeyboard(); ui.boxMsgText.focus(); setTimeout(function() { ui.boxMsgText.focus(); }, 150); } }, false); ui.footerLeft.addEventListener('tap', function(event) { var btnArray = [{ title: "拍照" }, { title: "从相册选择" }]; plus.nativeUI.actionSheet({ title: "选择照片", cancel: "取消", buttons: btnArray }, function(e) { var index = e.index; switch (index) { case 0: break; case 1: var cmr = plus.camera.getCamera(); cmr.captureImage(function(path) { send({ sender: 'self', type: 'image', content: "file://" + plus.io.convertLocalFileSystemURL(path) }); }, function(err) {}); break; case 2: plus.gallery.pick(function(path) { send({ sender: 'self', type: 'image', content: path }); }, function(err) {}, null); break; } }); }, false); var setSoundAlertVisable=function(show){ if(show){ ui.boxSoundAlert.style.display = 'block'; ui.boxSoundAlert.style.opacity = 1; }else{ ui.boxSoundAlert.style.opacity = 0; //fadeOut完成再真正隐藏 setTimeout(function(){ ui.boxSoundAlert.style.display = 'none'; },200); } }; var recordCancel = false; var recorder = null; var audio_tips = document.getElementById("audio_tips"); var startTimestamp = null; var stopTimestamp = null; var stopTimer = null; ui.boxMsgSound.addEventListener('hold', function(event) { recordCancel = false; if(stopTimer)clearTimeout(stopTimer); audio_tips.innerHTML = "手指上划,取消发送"; ui.boxSoundAlert.classList.remove('rprogress-sigh'); setSoundAlertVisable(true); recorder = plus.audio.getRecorder(); if (recorder == null) { plus.nativeUI.toast("不能获取录音对象"); return; } startTimestamp = (new Date()).getTime(); recorder.record({ filename: "_doc/audio/" }, function(path) { if (recordCancel) return; send({ sender: 'self', type: 'sound', content: path }); }, function(e) { plus.nativeUI.toast("录音时出现异常: " + e.message); }); }, false); ui.body.addEventListener('drag', function(event) { //console.log('drag'); if (Math.abs(event.detail.deltaY) > 50) { if (!recordCancel) { recordCancel = true; if (!audio_tips.classList.contains("cancel")) { audio_tips.classList.add("cancel"); } audio_tips.innerHTML = "松开手指,取消发送"; } } else { if (recordCancel) { recordCancel = false; if (audio_tips.classList.contains("cancel")) { audio_tips.classList.remove("cancel"); } audio_tips.innerHTML = "手指上划,取消发送"; } } }, false); ui.boxMsgSound.addEventListener('release', function(event) { //console.log('release'); if (audio_tips.classList.contains("cancel")) { audio_tips.classList.remove("cancel"); audio_tips.innerHTML = "手指上划,取消发送"; } // stopTimestamp = (new Date()).getTime(); if (stopTimestamp - startTimestamp < MIN_SOUND_TIME) { audio_tips.innerHTML = "录音时间太短"; ui.boxSoundAlert.classList.add('rprogress-sigh'); recordCancel = true; stopTimer=setTimeout(function(){ setSoundAlertVisable(false); },800); }else{ setSoundAlertVisable(false); } recorder.stop(); }, false); ui.boxMsgSound.addEventListener("touchstart", function(e) { //console.log("start...."); e.preventDefault(); }); ui.boxMsgText.addEventListener('input', function(event) { ui.btnMsgType.classList[ui.boxMsgText.value == '' ? 'remove' : 'add']('mui-icon-paperplane'); ui.btnMsgType.setAttribute("for", ui.boxMsgText.value == '' ? '' : 'msg-text'); ui.h.innerText = ui.boxMsgText.value.replace(new RegExp('\n', 'gm'), '\n-') || '-'; ui.footer.style.height = (ui.h.offsetHeight + footerPadding) + 'px'; ui.content.style.paddingBottom = ui.footer.style.height; }); ui.boxMsgText.addEventListener('tap', function(event) { ui.boxMsgText.focus(); setTimeout(function() { ui.boxMsgText.focus(); }, 0); }, false); }); }(mui, document));*/ </script> </body> </html>
markdown-wiki - Gogs: Go Git Service

markdown格式wiki文档

mode-haskell.js 17KB

    define("ace/mode/haskell_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var HaskellHighlightRules = function() { this.$rules = { start: [ { token: [ 'punctuation.definition.entity.haskell', 'keyword.operator.function.infix.haskell', 'punctuation.definition.entity.haskell' ], regex: '(`)([a-zA-Z_\']*?)(`)', comment: 'In case this regex seems unusual for an infix operator, note that Haskell allows any ordinary function application (elem 4 [1..10]) to be rewritten as an infix expression (4 `elem` [1..10]).' }, { token: 'constant.language.unit.haskell', regex: '\\(\\)' }, { token: 'constant.language.empty-list.haskell', regex: '\\[\\]' }, { token: 'keyword.other.haskell', regex: '\\bmodule\\b', push: [ { token: 'keyword.other.haskell', regex: '\\bwhere\\b', next: 'pop' }, { include: '#module_name' }, { include: '#module_exports' }, { token: 'invalid', regex: '[a-z]+' }, { defaultToken: 'meta.declaration.module.haskell' } ] }, { token: 'keyword.other.haskell', regex: '\\bclass\\b', push: [ { token: 'keyword.other.haskell', regex: '\\bwhere\\b', next: 'pop' }, { token: 'support.class.prelude.haskell', regex: '\\b(?:Monad|Functor|Eq|Ord|Read|Show|Num|(?:Frac|Ra)tional|Enum|Bounded|Real(?:Frac|Float)?|Integral|Floating)\\b' }, { token: 'entity.other.inherited-class.haskell', regex: '[A-Z][A-Za-z_\']*' }, { token: 'variable.other.generic-type.haskell', regex: '\\b[a-z][a-zA-Z0-9_\']*\\b' }, { defaultToken: 'meta.declaration.class.haskell' } ] }, { token: 'keyword.other.haskell', regex: '\\binstance\\b', push: [ { token: 'keyword.other.haskell', regex: '\\bwhere\\b|$', next: 'pop' }, { include: '#type_signature' }, { defaultToken: 'meta.declaration.instance.haskell' } ] }, { token: 'keyword.other.haskell', regex: 'import', push: [ { token: 'meta.import.haskell', regex: '$|;|^', next: 'pop' }, { token: 'keyword.other.haskell', regex: 'qualified|as|hiding' }, { include: '#module_name' }, { include: '#module_exports' }, { defaultToken: 'meta.import.haskell' } ] }, { token: [ 'keyword.other.haskell', 'meta.deriving.haskell' ], regex: '(deriving)(\\s*\\()', push: [ { token: 'meta.deriving.haskell', regex: '\\)', next: 'pop' }, { token: 'entity.other.inherited-class.haskell', regex: '\\b[A-Z][a-zA-Z_\']*' }, { defaultToken: 'meta.deriving.haskell' } ] }, { token: 'keyword.other.haskell', regex: '\\b(?:deriving|where|data|type|case|of|let|in|newtype|default)\\b' }, { token: 'keyword.operator.haskell', regex: '\\binfix[lr]?\\b' }, { token: 'keyword.control.haskell', regex: '\\b(?:do|if|then|else)\\b' }, { token: 'constant.numeric.float.haskell', regex: '\\b(?:[0-9]+\\.[0-9]+(?:[eE][+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+)\\b', comment: 'Floats are always decimal' }, { token: 'constant.numeric.haskell', regex: '\\b(?:[0-9]+|0(?:[xX][0-9a-fA-F]+|[oO][0-7]+))\\b' }, { token: [ 'meta.preprocessor.c', 'punctuation.definition.preprocessor.c', 'meta.preprocessor.c' ], regex: '^(\\s*)(#)(\\s*\\w+)', comment: 'In addition to Haskell\'s "native" syntax, GHC permits the C preprocessor to be run on a source file.' }, { include: '#pragma' }, { token: 'punctuation.definition.string.begin.haskell', regex: '"', push: [ { token: 'punctuation.definition.string.end.haskell', regex: '"', next: 'pop' }, { token: 'constant.character.escape.haskell', regex: '\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\"\'\\&])' }, { token: 'constant.character.escape.octal.haskell', regex: '\\\\o[0-7]+|\\\\x[0-9A-Fa-f]+|\\\\[0-9]+' }, { token: 'constant.character.escape.control.haskell', regex: '\\^[A-Z@\\[\\]\\\\\\^_]' }, { defaultToken: 'string.quoted.double.haskell' } ] }, { token: [ 'punctuation.definition.string.begin.haskell', 'string.quoted.single.haskell', 'constant.character.escape.haskell', 'constant.character.escape.octal.haskell', 'constant.character.escape.hexadecimal.haskell', 'constant.character.escape.control.haskell', 'punctuation.definition.string.end.haskell' ], regex: '(\')(?:([\\ -\\[\\]-~])|(\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\"\'\\&]))|(\\\\o[0-7]+)|(\\\\x[0-9A-Fa-f]+)|(\\^[A-Z@\\[\\]\\\\\\^_]))(\')' }, { token: [ 'meta.function.type-declaration.haskell', 'entity.name.function.haskell', 'meta.function.type-declaration.haskell', 'keyword.other.double-colon.haskell' ], regex: '^(\\s*)([a-z_][a-zA-Z0-9_\']*|\\([|!%$+\\-.,=</>]+\\))(\\s*)(::)', push: [ { token: 'meta.function.type-declaration.haskell', regex: '$', next: 'pop' }, { include: '#type_signature' }, { defaultToken: 'meta.function.type-declaration.haskell' } ] }, { token: 'support.constant.haskell', regex: '\\b(?:Just|Nothing|Left|Right|True|False|LT|EQ|GT|\\(\\)|\\[\\])\\b' }, { token: 'constant.other.haskell', regex: '\\b[A-Z]\\w*\\b' }, { include: '#comments' }, { token: 'support.function.prelude.haskell', regex: '\\b(?:abs|acos|acosh|all|and|any|appendFile|applyM|asTypeOf|asin|asinh|atan|atan2|atanh|break|catch|ceiling|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|div|divMod|drop|dropWhile|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromEnum|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|head|id|init|interact|ioError|isDenormalized|isIEEE|isInfinite|isNaN|isNegativeZero|iterate|last|lcm|length|lex|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|odd|or|otherwise|pi|pred|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|read|readFile|readIO|readList|readLn|readParen|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showList|showParen|showString|shows|showsPrec|significand|signum|sin|sinh|snd|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|toEnum|toInteger|toRational|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\\b' }, { include: '#infix_op' }, { token: 'keyword.operator.haskell', regex: '[|!%$?~+:\\-.=</>\\\\]+', comment: 'In case this regex seems overly general, note that Haskell permits the definition of new operators which can be nearly any string of punctuation characters, such as $%^&*.' }, { token: 'punctuation.separator.comma.haskell', regex: ',' } ], '#block_comment': [ { token: 'punctuation.definition.comment.haskell', regex: '\\{-(?!#)', push: [ { include: '#block_comment' }, { token: 'punctuation.definition.comment.haskell', regex: '-\\}', next: 'pop' }, { defaultToken: 'comment.block.haskell' } ] } ], '#comments': [ { token: 'punctuation.definition.comment.haskell', regex: '--.*', push_: [ { token: 'comment.line.double-dash.haskell', regex: '$', next: 'pop' }, { defaultToken: 'comment.line.double-dash.haskell' } ] }, { include: '#block_comment' } ], '#infix_op': [ { token: 'entity.name.function.infix.haskell', regex: '\\([|!%$+:\\-.=</>]+\\)|\\(,+\\)' } ], '#module_exports': [ { token: 'meta.declaration.exports.haskell', regex: '\\(', push: [ { token: 'meta.declaration.exports.haskell.end', regex: '\\)', next: 'pop' }, { token: 'entity.name.function.haskell', regex: '\\b[a-z][a-zA-Z_\']*' }, { token: 'storage.type.haskell', regex: '\\b[A-Z][A-Za-z_\']*' }, { token: 'punctuation.separator.comma.haskell', regex: ',' }, { include: '#infix_op' }, { token: 'meta.other.unknown.haskell', regex: '\\(.*?\\)', comment: 'So named because I don\'t know what to call this.' }, { defaultToken: 'meta.declaration.exports.haskell.end' } ] } ], '#module_name': [ { token: 'support.other.module.haskell', regex: '[A-Z][A-Za-z._\']*' } ], '#pragma': [ { token: 'meta.preprocessor.haskell', regex: '\\{-#', push: [ { token: 'meta.preprocessor.haskell', regex: '#-\\}', next: 'pop' }, { token: 'keyword.other.preprocessor.haskell', regex: '\\b(?:LANGUAGE|UNPACK|INLINE)\\b' }, { defaultToken: 'meta.preprocessor.haskell' } ] } ], '#type_signature': [ { token: [ 'meta.class-constraint.haskell', 'entity.other.inherited-class.haskell', 'meta.class-constraint.haskell', 'variable.other.generic-type.haskell', 'meta.class-constraint.haskell', 'keyword.other.big-arrow.haskell' ], regex: '(\\(\\s*)([A-Z][A-Za-z]*)(\\s+)([a-z][A-Za-z_\']*)(\\)\\s*)(=>)' }, { include: '#pragma' }, { token: 'keyword.other.arrow.haskell', regex: '->' }, { token: 'keyword.other.big-arrow.haskell', regex: '=>' }, { token: 'support.type.prelude.haskell', regex: '\\b(?:Int(?:eger)?|Maybe|Either|Bool|Float|Double|Char|String|Ordering|ShowS|ReadS|FilePath|IO(?:Error)?)\\b' }, { token: 'variable.other.generic-type.haskell', regex: '\\b[a-z][a-zA-Z0-9_\']*\\b' }, { token: 'storage.type.haskell', regex: '\\b[A-Z][a-zA-Z0-9_\']*\\b' }, { token: 'support.constant.unit.haskell', regex: '\\(\\)' }, { include: '#comments' } ] } this.normalizeRules(); }; HaskellHighlightRules.metaData = { fileTypes: [ 'hs' ], keyEquivalent: '^~H', name: 'Haskell', scopeName: 'source.haskell' } oop.inherits(HaskellHighlightRules, TextHighlightRules); exports.HaskellHighlightRules = HaskellHighlightRules; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/haskell",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haskell_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var HaskellHighlightRules = require("./haskell_highlight_rules").HaskellHighlightRules; var FoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = HaskellHighlightRules; this.foldingRules = new FoldMode(); this.$behaviour = this.$defaultBehaviour; }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "--"; this.blockComment = null; this.$id = "ace/mode/haskell"; }).call(Mode.prototype); exports.Mode = Mode; });
jiapeng/portal-front - Gogs: Go Git Service

5 Commits (8cea013d4e5c418dd0bcf784115b8a7420741308)

Auteur SHA1 Bericht Datum
  luyanan a2e775138b 新版邀请注册页面 7 jaren geleden
  luyanan 70efc5c3e9 修改判断标识以及专家头像与企业logo的区别 7 jaren geleden
  luyanan 54b4ca9029 文章图片显示有缝隙 7 jaren geleden
  luyanan a43d451436 文章分享页面专家信息展示 7 jaren geleden
  luyanan 5543ff1f99 分享页面提取share.css 7 jaren geleden
portal-front - Gogs: Go Git Service

portal html css js resource

xuchunyang bdf84638b6 编辑器组件 7 年之前
..
mootools-adapter.js bdf84638b6 编辑器组件 7 年之前
mootools-adapter.src.js bdf84638b6 编辑器组件 7 年之前
prototype-adapter.js bdf84638b6 编辑器组件 7 年之前
prototype-adapter.src.js bdf84638b6 编辑器组件 7 年之前
standalone-framework.js bdf84638b6 编辑器组件 7 年之前
standalone-framework.src.js bdf84638b6 编辑器组件 7 年之前
portal-front - Gogs: Go Git Service

portal html css js resource

modify-password.js 2.3KB

    //修改密码 $(function(){ loginStatus();//判断个人是否登录 valUser(); var oldPass = false; var isPass = false; var isPass2 = false; }) /*校验当前密码*/ function valOld() { var oldPassword = $("#oldPassword").val(); if(oldPassword.length == 0) { $(".msg1").text("请输入密码"); oldPass = false; } else if(oldPassword.length < 6) { $(".msg1").text("密码不少于6位,请输入正确的密码"); } else { $(".msg1").text(""); oldPass = true; } } /*校验新密码*/ function valNew() { var newPassword = $("#newPassword").val(); var oldPassword = $("#oldPassword").val(); if(newPassword.length == 0) { $(".msg2").text("密码不能为空"); } else if(newPassword.length < 6) { $(".msg2").text("密码长度过短,至少六位"); } else if(newPassword2 == newPassword) { $(".msg2").text("新旧密码不能一致"); } else { isPass = true; $(".msg2").text(""); } } /*校验确认密码*/ function valNew2() { var newPassword = $("#newPassword").val(); var newPassword2 = $("#newPassword2").val(); if(newPassword2.length == 0) { $(".msg3").text("密码不能为空"); } else if(newPassword2 != newPassword) { $(".msg3").text("两次输入密码不一致"); } else { isPass2 = true; $(".msg3").text(""); } } /*提交修改密码*/ function restPassword() { valOld(); valNew(); valNew2(); if(oldPass == true && isPass == true && isPass2 == true) { $.ajax("/ajax/cp", { type: "POST", async: false, success: function(data) { if(data.success) { if(data.data == true) { $.MsgBox.Confirm("消息提醒", "设置成功,请重新登录",function(){ location.href="login.html"; }); $("#mb_msgicon").css("background", 'url("images/sign_icon_chenggong_nor.png") 0% 0% / contain'); } else { $.MsgBox.Alert("消息提醒", "设置失败,请检查密码是否正确!"); } } else { $.MsgBox.Alert("消息提醒", "服务器链接超时!"); } }, error: function() { $.MsgBox.Alert('message', 'fail') }, data: { "id": $.cookie("userid"), "npw": $("#newPassword2").val(), "onw": $("#oldPassword").val() }, dataType: 'json' }); } else { /*alert("请校验密码");*/ } }
XMTT/markdown-wiki - Gogs: Go Git Service

1 次代码提交 (2d914b30acbb37ad671791c07c14a6c923e99fd8)

作者 SHA1 备注 提交日期
  huwhois 35a073de1a 静态文件与模板文件 1 年之前
suryee - Gogs: Go Git Service

赛亿官网

JQuery.cookie.js 3.8KB

    /** * Cookie plugin * * Copyright (c) 2006 Klaus Hartl (stilbuero.de) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ /** * Create a cookie with the given name and value and other optional parameters. * * @example $.cookie('the_cookie', 'the_value'); * @desc Set the value of a cookie. * @example $.cookie('the_cookie', 'the_value', {expires: 7, path: '/', domain: 'jquery.com', secure: true}); * @desc Create a cookie with all available options. * @example $.cookie('the_cookie', 'the_value'); * @desc Create a session cookie. * @example $.cookie('the_cookie', null); * @desc Delete a cookie by passing null as value. * * @param String name The name of the cookie. * @param String value The value of the cookie. * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. * If set to null or omitted, the cookie will be a session cookie and will not be retained * when the the browser exits. * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will * require a secure protocol (like HTTPS). * @type undefined * * @name $.cookie * @cat Plugins/Cookie * @author Klaus Hartl/klaus.hartl@stilbuero.de */ /** * Get the value of a cookie with the given name. * * @example $.cookie('the_cookie'); * @desc Get the value of a cookie. * * @param String name The name of the cookie. * @return The value of the cookie. * @type String * * @name $.cookie * @cat Plugins/Cookie * @author Klaus Hartl/klaus.hartl@stilbuero.de */ jQuery.cookie = function(name, value, options) { if (typeof value != 'undefined') { // name and value given, set cookie options = options || {}; if (value === null) { value = ''; options.expires = -1; } var expires = ''; if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { var date; if (typeof options.expires == 'number') { date = new Date(); date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); } else { date = options.expires; } expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE } var path = options.path ? '; path=' + options.path : ''; var domain = options.domain ? '; domain=' + options.domain : ''; var secure = options.secure ? '; secure' : ''; document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); } else { // only name given, get cookie var cookieValue = null; if (document.cookie && document.cookie != '') { var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) { var cookie = jQuery.trim(cookies[i]); // Does this cookie string begin with the name we want? if (cookie.substring(0, name.length + 1) == (name + '=')) { cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); break; } } } return cookieValue; } };
bulomakaka/ekexiu.app - Gogs: Go Git Service

1 Commits (8df9772ba626f3a5edc28e9206335af275fffd0b)

Author SHA1 Message Date
  xuchunyang f0efa4580c 新添加身份认证功能 8 years ago
jiapeng/portal-front - Gogs: Go Git Service

1 Commits (cc029bad2696b1d02039e21bc79f837abcb7f8c9)

Autore SHA1 Messaggio Data
  xuchunyang bdf84638b6 编辑器组件 7 anni fa
Sign In - Gogs: Go Git Service

Sign In