removed media queries polyfiles

This commit is contained in:
coderaiser 2012-08-16 10:42:14 -04:00
parent ab962b9102
commit 16e7e56498
4 changed files with 49 additions and 42 deletions

View file

@ -364,7 +364,13 @@ CloudClient.Util = (function(){
return this.anyload(pParams_o);
};
this.getById = function(pId){return document.getElementById(pId);};
this.getByTag = function(pTag, pElement){
return (pElement || document).getElementsByTagName(pTag);
};
this.getById = function(pId, pElement){
return (pElement || document).getElementById(pId);
};
/*
@ -675,7 +681,7 @@ CloudClient.keyBinding=(function(){
/* function loads and shows editor */
CloudClient.Editor = (function() {
/* loading CloudMirror plagin */
/* loading CloudMirror plagin */
Util.jsload(CloudClient.LIBDIRCLIENT +
'editor.js',{
onload:(function(){

View file

@ -10,9 +10,8 @@
<link rel=stylesheet href=/css/style.css>
<!--[if lt IE 9]>
<script src="//ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<script src="//code.jquery.com/jquery-1.8.0.min.js" id=jquery-1_8_0_min_js ></script>
<script async src="http://dl.dropbox.com/u/78163899/mnemonia/js/css3-mediaqueries.js"></script>
<script src="//ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<script src="//code.jquery.com/jquery-1.8.0.min.js" id=jquery-1_8_0_min_js ></script>
<![endif]-->
</head>

View file

@ -107,10 +107,7 @@ CloudCommander.Editor.CodeMirror.show = (function(){
var lA;
/* getting link */
lA = lCurrent.getElementsByTagName('a');
if(!lA.length)
return console.log('Error:' +
'can not find links in current file');
lA = this.getByTag('a', lCurrent);
lA = lA[0].href;

View file

@ -12,6 +12,7 @@ CloudCommander.Menu.dir = './lib/client/menu/';
* for menu
*/
CloudCommander.Menu.getConfig = (function(){
var lThis = this;
return{
// define which elements trigger this menu
selector: 'li',
@ -27,9 +28,11 @@ CloudCommander.Menu.getConfig = (function(){
}
}},
edit: {name: "Edit", callback: function(key, opt){
lThis.Images.showLoad();
if(typeof CloudCommander.Editor === 'function')
CloudCommander.Editor();
else{
else{
var lEditor = CloudCommander.Editor.get();
if(lEditor && lEditor.show)
lEditor.show();
@ -87,39 +90,41 @@ CloudCommander.Menu.set = (function(){
*/
document.onclick = function(pEvent){
if(pEvent && pEvent.x && pEvent.y){
var lLayer = lThis.getById('context-menu-layer');
var lStyle;
if(lLayer)
lStyle = lLayer.style.cssText;
/* hide invisible menu layer */
if(lStyle)
lLayer.style.cssText = lStyle
.replace('z-index: 1', 'z-index:-1');
/* get element by point */
var lElement = document.elementFromPoint(pEvent.x, pEvent.y);
var lTag = lElement.tagName;
var lParent;
if(lTag === 'A' || lTag === 'SPAN'){
if (lElement.tagName === 'A')
lParent = lElement.parentElement.parentElement;
else if(lElement.tagName === 'SPAN')
lParent = lElement.parentElement;
lThis.setCurrentFile(lParent);
if(lLayer){
var lLayer = lThis.getById('context-menu-layer');
var lStyle;
if(lLayer)
lStyle = lLayer.style.cssText;
/* hide invisible menu layer */
if(lStyle)
lLayer.style.cssText = lStyle
.replace('z-index: 1', 'z-index:-1');
/* get element by point */
var lElement = document.elementFromPoint(pEvent.x, pEvent.y);
var lTag = lElement.tagName;
var lParent;
if(lTag === 'A' || lTag === 'SPAN'){
if (lElement.tagName === 'A')
lParent = lElement.parentElement.parentElement;
else if(lElement.tagName === 'SPAN')
lParent = lElement.parentElement;
lThis.setCurrentFile(lParent);
}
/* show invisible menu layer */
if(lLayer && lStyle)
lLayer.style.cssText = lStyle;
/* if document.onclick was set up
* before us, it's best time to call it
*/
if(typeof lFunc_f === 'function')
lFunc_f();
}
/* show invisible menu layer */
if(lLayer && lStyle)
lLayer.style.cssText = lStyle;
/* if document.onclick was set up
* before us, it's best time to call it
*/
if(typeof lFunc_f === 'function')
lFunc_f();
}
};