# HG changeset patch # User ymh # Date 1432309694 -7200 # Node ID adb907bba95656bacfc9090eb250819c122b0653 # Parent 4732f078d0fecc226b4b790097c58a6cd30c3832 add server php example diff -r 4732f078d0fe -r adb907bba956 .hgignore --- a/.hgignore Wed May 13 10:02:04 2015 +0200 +++ b/.hgignore Fri May 22 17:48:14 2015 +0200 @@ -26,3 +26,5 @@ ^client/bower_components ^client/lib ^server/python/django/MANIFEST\.in$ +^server/php/basic/resources/config.php$ +^server/php/basic/data diff -r 4732f078d0fe -r adb907bba956 client/gruntfile.js --- a/client/gruntfile.js Wed May 13 10:02:04 2015 +0200 +++ b/client/gruntfile.js Fri May 22 17:48:14 2015 +0200 @@ -114,8 +114,10 @@ }, renkan_server: { files: [ - {expand: true, cwd: 'dist', src: ['**', '!data/*', '!lib/**'], dest: '../server/python/django/renkanmanager/static/renkanmanager/lib/renkan/', filter: 'isFile'}, - {expand: true, cwd: 'dist/lib', src: ['**'], dest: '../server/python/django/renkanmanager/static/renkanmanager/lib/', filter: 'isFile'} + {expand: true, cwd: 'dist', src: ['**', '!data/*', '!lib/**'], dest: '../server/python/django/renkanmanager/static/renkanmanager/lib/renkan/', filter: 'isFile'}, + {expand: true, cwd: 'dist/lib', src: ['**'], dest: '../server/python/django/renkanmanager/static/renkanmanager/lib/', filter: 'isFile'}, + {expand: true, cwd: 'dist', src: ['**', '!data/*', '!lib/**'], dest: '../server/php/basic/public_html/static/lib/renkan/', filter: 'isFile'}, + {expand: true, cwd: 'dist/lib', src: ['**'], dest: '../server/php/basic/public_html/static/lib/', filter: 'isFile'} ] } }, @@ -147,7 +149,7 @@ watch: { css:{ files: ['css/**/*.css'], - tasks: ['cssmin', 'copy:renkan_css'], + tasks: ['cssmin', 'copy:renkan_css'], }, js:{ files: ['js/**/*.js', 'templates/**/*.html'], diff -r 4732f078d0fe -r adb907bba956 client/js/main-renderer.js --- a/client/js/main-renderer.js Wed May 13 10:02:04 2015 +0200 +++ b/client/js/main-renderer.js Fri May 22 17:48:14 2015 +0200 @@ -4,8 +4,6 @@ require.config({ paths: { 'jquery':'../lib/jquery/jquery', -// 'underscore':'../lib/underscore/underscore', -// 'underscore':'../lib/lodash-compat/lodash', 'underscore':'../lib/lodash/lodash', 'filesaver' :'../lib/FileSaver/FileSaver', 'requtils':'require-utils' diff -r 4732f078d0fe -r adb907bba956 server/java/renkan-web/src/main/webapp/static/js/corenkan.js --- a/server/java/renkan-web/src/main/webapp/static/js/corenkan.js Wed May 13 10:02:04 2015 +0200 +++ b/server/java/renkan-web/src/main/webapp/static/js/corenkan.js Fri May 22 17:48:14 2015 +0200 @@ -40,7 +40,7 @@ }); sess.onStatusChange = function(status) { - console.log(status); + console.log("STATUS : ", status); that.onInternalStatusChange(status); if(typeof that.onStatusChange === "function") { that.onStatusChange(status); diff -r 4732f078d0fe -r adb907bba956 server/php/basic/public_html/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/php/basic/public_html/index.php Fri May 22 17:48:14 2015 +0200 @@ -0,0 +1,15 @@ + listProjects() + ); + + $css = ['static/lib/foundation/css/foundation-icons.css']; + + renderLayoutWithContentFile("home.php", $variables, $css); diff -r 4732f078d0fe -r adb907bba956 server/php/basic/public_html/renkan.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/php/basic/public_html/renkan.php Fri May 22 17:48:14 2015 +0200 @@ -0,0 +1,25 @@ + $resRenkan[0], 'self_url' => selfURL(), 'self_base_url' => selfBaseURL()]; + $css = []; + + renderLayoutWithContentFile("renkan_del.php", $variables, $css); diff -r 4732f078d0fe -r adb907bba956 server/php/basic/public_html/renkan_edit.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/php/basic/public_html/renkan_edit.php Fri May 22 17:48:14 2015 +0200 @@ -0,0 +1,32 @@ + $config, 'renkanId' => $_GET['renkanId']]; + $css = [ + 'static/lib/renkan/css/renkan.css' + ]; + + renderLayoutWithContentFile("renkan_edit.php", $variables, $css); diff -r 4732f078d0fe -r adb907bba956 server/php/basic/public_html/renkan_read.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/php/basic/public_html/renkan_read.php Fri May 22 17:48:14 2015 +0200 @@ -0,0 +1,12 @@ + $config, 'renkanId' => $_GET['renkanId']]; + $css = [ + 'static/lib/renkan/css/renkan.css' + ]; + + renderLayoutWithContentFile("renkan_read.php", $variables, $css); diff -r 4732f078d0fe -r adb907bba956 server/php/basic/public_html/static/css/renkanphp.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/php/basic/public_html/static/css/renkanphp.css Fri May 22 17:48:14 2015 +0200 @@ -0,0 +1,85 @@ +.Rk-PadTitle { + height: unset; +} + +.rnk-container { + min-height: 100%; + position: relative; + width: 100%; +} + +input[type="search"].Rk-GraphSearch-Field { + height: 2em; +} + +.Rk-Fold-Bins { + width: unset; +} + +.Rk-Bins-Title { + height: unset; + width: unset; +} + +input[type="search"].Rk-Bins-Search-Input { + width: 235px; + line-height: 25px; + height: 25px; + padding: 0; +} + + +#content { + position:absolute; + top:45px; + left: 0; + right: 0; + bottom: 45px; +} + +#renkanlist { + margin-top: 5em; +} + +#renkanlist-table { + width: 90%; +} + +#renkanlist-title-header { + width: 90%; +} + +#renkanlist-actions-header { + width: 10%; +} + + +.renkanlist-actions { + text-align: center; +} + +.renkanlist-actions .has-tip { + cursor: pointer; +} + +.renkanlist-actions span { + margin: 0 0.2em; +} + +.renkandel-buttons form { + display: inline-block; + margin: 0 0.5em; +} + +footer{ + height: 40px; + position: fixed; + bottom: 0px; + left: 0px; + line-height: 40px; + background: #333 none repeat scroll 0% 0%; + color: #FFF; + text-align: center; + width: 100%; + padding: 0px 10px; +} diff -r 4732f078d0fe -r adb907bba956 server/php/basic/public_html/static/img/.hgkeep --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/php/basic/public_html/static/img/.hgkeep Fri May 22 17:48:14 2015 +0200 @@ -0,0 +1,1 @@ + diff -r 4732f078d0fe -r adb907bba956 server/php/basic/public_html/static/img/renkan-white-30x30.png Binary file server/php/basic/public_html/static/img/renkan-white-30x30.png has changed diff -r 4732f078d0fe -r adb907bba956 server/php/basic/public_html/static/img/renkan.png Binary file server/php/basic/public_html/static/img/renkan.png has changed diff -r 4732f078d0fe -r adb907bba956 server/php/basic/public_html/static/js/vendor/fastclick.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/php/basic/public_html/static/js/vendor/fastclick.js Fri May 22 17:48:14 2015 +0200 @@ -0,0 +1,8 @@ +!function(){"use strict";/** + * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs. + * + * @codingstandard ftlabs-jsv2 + * @copyright The Financial Times Limited [All Rights Reserved] + * @license MIT License (see LICENSE.txt) + */ +function a(b,d){function e(a,b){return function(){return a.apply(b,arguments)}}var f;if(d=d||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=d.touchBoundary||10,this.layer=b,this.tapDelay=d.tapDelay||200,this.tapTimeout=d.tapTimeout||700,!a.notNeeded(b)){for(var g=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],h=this,i=0,j=g.length;j>i;i++)h[g[i]]=e(h[g[i]],h);c&&(b.addEventListener("mouseover",this.onMouse,!0),b.addEventListener("mousedown",this.onMouse,!0),b.addEventListener("mouseup",this.onMouse,!0)),b.addEventListener("click",this.onClick,!0),b.addEventListener("touchstart",this.onTouchStart,!1),b.addEventListener("touchmove",this.onTouchMove,!1),b.addEventListener("touchend",this.onTouchEnd,!1),b.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(b.removeEventListener=function(a,c,d){var e=Node.prototype.removeEventListener;"click"===a?e.call(b,a,c.hijacked||c,d):e.call(b,a,c,d)},b.addEventListener=function(a,c,d){var e=Node.prototype.addEventListener;"click"===a?e.call(b,a,c.hijacked||(c.hijacked=function(a){a.propagationStopped||c(a)}),d):e.call(b,a,c,d)}),"function"==typeof b.onclick&&(f=b.onclick,b.addEventListener("click",function(a){f(a)},!1),b.onclick=null)}}var b=navigator.userAgent.indexOf("Windows Phone")>=0,c=navigator.userAgent.indexOf("Android")>0&&!b,d=/iP(ad|hone|od)/.test(navigator.userAgent)&&!b,e=d&&/OS 4_\d(_\d)?/.test(navigator.userAgent),f=d&&/OS [6-7]_\d/.test(navigator.userAgent),g=navigator.userAgent.indexOf("BB10")>0;a.prototype.needsClick=function(a){switch(a.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(a.disabled)return!0;break;case"input":if(d&&"file"===a.type||a.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(a.className)},a.prototype.needsFocus=function(a){switch(a.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!c;case"input":switch(a.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!a.disabled&&!a.readOnly;default:return/\bneedsfocus\b/.test(a.className)}},a.prototype.sendClick=function(a,b){var c,d;document.activeElement&&document.activeElement!==a&&document.activeElement.blur(),d=b.changedTouches[0],c=document.createEvent("MouseEvents"),c.initMouseEvent(this.determineEventType(a),!0,!0,window,1,d.screenX,d.screenY,d.clientX,d.clientY,!1,!1,!1,!1,0,null),c.forwardedTouchEvent=!0,a.dispatchEvent(c)},a.prototype.determineEventType=function(a){return c&&"select"===a.tagName.toLowerCase()?"mousedown":"click"},a.prototype.focus=function(a){var b;d&&a.setSelectionRange&&0!==a.type.indexOf("date")&&"time"!==a.type&&"month"!==a.type?(b=a.value.length,a.setSelectionRange(b,b)):a.focus()},a.prototype.updateScrollParent=function(a){var b,c;if(b=a.fastClickScrollParent,!b||!b.contains(a)){c=a;do{if(c.scrollHeight>c.offsetHeight){b=c,a.fastClickScrollParent=c;break}c=c.parentElement}while(c)}b&&(b.fastClickLastScrollTop=b.scrollTop)},a.prototype.getTargetElementFromEventTarget=function(a){return a.nodeType===Node.TEXT_NODE?a.parentNode:a},a.prototype.onTouchStart=function(a){var b,c,f;if(a.targetTouches.length>1)return!0;if(b=this.getTargetElementFromEventTarget(a.target),c=a.targetTouches[0],d){if(f=window.getSelection(),f.rangeCount&&!f.isCollapsed)return!0;if(!e){if(c.identifier&&c.identifier===this.lastTouchIdentifier)return a.preventDefault(),!1;this.lastTouchIdentifier=c.identifier,this.updateScrollParent(b)}}return this.trackingClick=!0,this.trackingClickStart=a.timeStamp,this.targetElement=b,this.touchStartX=c.pageX,this.touchStartY=c.pageY,a.timeStamp-this.lastClickTimec||Math.abs(b.pageY-this.touchStartY)>c?!0:!1},a.prototype.onTouchMove=function(a){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(a.target)||this.touchHasMoved(a))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},a.prototype.findControl=function(a){return void 0!==a.control?a.control:a.htmlFor?document.getElementById(a.htmlFor):a.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},a.prototype.onTouchEnd=function(a){var b,g,h,i,j,k=this.targetElement;if(!this.trackingClick)return!0;if(a.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=a.timeStamp,g=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,f&&(j=a.changedTouches[0],k=document.elementFromPoint(j.pageX-window.pageXOffset,j.pageY-window.pageYOffset)||k,k.fastClickScrollParent=this.targetElement.fastClickScrollParent),h=k.tagName.toLowerCase(),"label"===h){if(b=this.findControl(k)){if(this.focus(k),c)return!1;k=b}}else if(this.needsFocus(k))return a.timeStamp-g>100||d&&window.top!==window&&"input"===h?(this.targetElement=null,!1):(this.focus(k),this.sendClick(k,a),d&&"select"===h||(this.targetElement=null,a.preventDefault()),!1);return d&&!e&&(i=k.fastClickScrollParent,i&&i.fastClickLastScrollTop!==i.scrollTop)?!0:(this.needsClick(k)||(a.preventDefault(),this.sendClick(k,a)),!1)},a.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},a.prototype.onMouse=function(a){return this.targetElement?a.forwardedTouchEvent?!0:a.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(a.stopImmediatePropagation?a.stopImmediatePropagation():a.propagationStopped=!0,a.stopPropagation(),a.preventDefault(),!1):!0:!0},a.prototype.onClick=function(a){var b;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===a.target.type&&0===a.detail?!0:(b=this.onMouse(a),b||(this.targetElement=null),b)},a.prototype.destroy=function(){var a=this.layer;c&&(a.removeEventListener("mouseover",this.onMouse,!0),a.removeEventListener("mousedown",this.onMouse,!0),a.removeEventListener("mouseup",this.onMouse,!0)),a.removeEventListener("click",this.onClick,!0),a.removeEventListener("touchstart",this.onTouchStart,!1),a.removeEventListener("touchmove",this.onTouchMove,!1),a.removeEventListener("touchend",this.onTouchEnd,!1),a.removeEventListener("touchcancel",this.onTouchCancel,!1)},a.notNeeded=function(a){var b,d,e,f;if("undefined"==typeof window.ontouchstart)return!0;if(d=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!c)return!0;if(b=document.querySelector("meta[name=viewport]")){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(d>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(g&&(e=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),e[1]>=10&&e[2]>=3&&(b=document.querySelector("meta[name=viewport]")))){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===a.style.msTouchAction||"manipulation"===a.style.touchAction?!0:(f=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],f>=27&&(b=document.querySelector("meta[name=viewport]"),b&&(-1!==b.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===a.style.touchAction||"manipulation"===a.style.touchAction?!0:!1)},a.attach=function(b,c){return new a(b,c)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return a}):"undefined"!=typeof module&&module.exports?(module.exports=a.attach,module.exports.FastClick=a):window.FastClick=a}(); diff -r 4732f078d0fe -r adb907bba956 server/php/basic/public_html/static/js/vendor/jquery.cookie.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/php/basic/public_html/static/js/vendor/jquery.cookie.js Fri May 22 17:48:14 2015 +0200 @@ -0,0 +1,8 @@ +/*! + * jQuery Cookie Plugin v1.4.1 + * https://github.com/carhartl/jquery-cookie + * + * Copyright 2013 Klaus Hartl + * Released under the MIT license + */ +!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}}); diff -r 4732f078d0fe -r adb907bba956 server/php/basic/public_html/static/js/vendor/jquery.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/php/basic/public_html/static/js/vendor/jquery.js Fri May 22 17:48:14 2015 +0200 @@ -0,0 +1,27 @@ +/*! + * jQuery JavaScript Library v2.1.4 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2015-04-28T16:01Z + */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b="length"in a&&a.length,c=_.type(a);return"function"===c||_.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a,b,c){if(_.isFunction(b))return _.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return _.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(ha.test(b))return _.filter(b,a,c);b=_.filter(b,a)}return _.grep(a,function(a){return U.call(b,a)>=0!==c})}function e(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function f(a){var b=oa[a]={};return _.each(a.match(na)||[],function(a,c){b[c]=!0}),b}function g(){Z.removeEventListener("DOMContentLoaded",g,!1),a.removeEventListener("load",g,!1),_.ready()}function h(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=_.expando+h.uid++}function i(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(ua,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:ta.test(c)?_.parseJSON(c):c}catch(e){}sa.set(a,b,c)}else c=void 0;return c}function j(){return!0}function k(){return!1}function l(){try{return Z.activeElement}catch(a){}}function m(a,b){return _.nodeName(a,"table")&&_.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function n(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function o(a){var b=Ka.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function p(a,b){for(var c=0,d=a.length;d>c;c++)ra.set(a[c],"globalEval",!b||ra.get(b[c],"globalEval"))}function q(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(ra.hasData(a)&&(f=ra.access(a),g=ra.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)_.event.add(b,e,j[e][c])}sa.hasData(a)&&(h=sa.access(a),i=_.extend({},h),sa.set(b,i))}}function r(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&_.nodeName(a,b)?_.merge([a],c):c}function s(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ya.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}function t(b,c){var d,e=_(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:_.css(e[0],"display");return e.detach(),f}function u(a){var b=Z,c=Oa[a];return c||(c=t(a,b),"none"!==c&&c||(Na=(Na||_("