From f4ec218fa527381b22e0409fc851e26b2250cc67 Mon Sep 17 00:00:00 2001 From: Arvind Khadri Date: Mon, 30 Jan 2012 13:04:43 +0100 Subject: [PATCH] Fixes for drop down --- server/wsgi/page_edit.js | 120 +++++++++++++++++++++++----------------------- 1 file changed, 59 insertions(+), 61 deletions(-) diff --git a/server/wsgi/page_edit.js b/server/wsgi/page_edit.js index d1cd20d..7e87f14 100755 --- a/server/wsgi/page_edit.js +++ b/server/wsgi/page_edit.js @@ -1,4 +1,4 @@ -function page_edit( boltSlug, pageSlug, uploadSlug, editMode, hasEditPermission, successUrl) +function page_edit_client( boltSlug, pageSlug, uploadSlug, editMode, hasEditPermission, successUrl) { var console, PopupControl, M4ImageElement,locName='',langName = '',styleName='',authorValue; @@ -1120,6 +1120,7 @@ function page_edit( boltSlug, pageSlug, uploadSlug, editMode, hasEditPermission, path = "/" + xname + path; } } + console.log(path); return path; }; @@ -1175,7 +1176,7 @@ function page_edit( boltSlug, pageSlug, uploadSlug, editMode, hasEditPermission, path = DOM.makePath(currentNode.parentNode); } - + console.log(path); return path; }; @@ -1748,21 +1749,22 @@ function page_edit( boltSlug, pageSlug, uploadSlug, editMode, hasEditPermission, author.setAttribute("style","position:absolute;top:65%;left:40%;width:250px;"); target.appendChild(author); - ourcheck = document.createElement("input"); - ourcheck.setAttribute("id","your-check"); - ourcheck.setAttribute("type","radio"); - ourcheck.setAttribute("name", "blog"); - ourcheck.setAttribute("alipielements", "alipi"); - ourcheck.setAttribute("style","position:absolute;top:85%;left:40%;"); - target.appendChild(ourcheck); - yourcheck = document.createElement("input"); - yourcheck.setAttribute("id","our-check"); + yourcheck.setAttribute("id","your-check"); yourcheck.setAttribute("type","radio"); yourcheck.setAttribute("name", "blog"); yourcheck.setAttribute("alipielements", "alipi"); - yourcheck.setAttribute("style","position:absolute;top:85%;left:70%;"); + yourcheck.setAttribute("style","position:absolute;top:85%;left:40%;"); target.appendChild(yourcheck); + yourcheck.disabled = true; + + ourcheck = document.createElement("input"); + ourcheck.setAttribute("id","our-check"); + ourcheck.setAttribute("type","radio"); + ourcheck.setAttribute("name", "blog"); + ourcheck.setAttribute("alipielements", "alipi"); + ourcheck.setAttribute("style","position:absolute;top:85%;left:70%;"); + target.appendChild(ourcheck); yourLabel = document.createElement('label'); yourLabel.textContent = "Your blog"; @@ -1779,7 +1781,7 @@ function page_edit( boltSlug, pageSlug, uploadSlug, editMode, hasEditPermission, locButton.setAttribute("title","Set your preferred location"); locButton.value="+"; locButton.setAttribute("type","button"); - locButton.setAttribute("style","position:absolute;top:5%;left:90%;width:20px;"); + locButton.setAttribute("style","position:absolute;top:6%;right:4%;width:20px;"); locButton.setAttribute("alipielements", "alipi"); //locButton.setAttribute("type","button"); if (window.location.hostname != '127.0.0.1') { @@ -1791,7 +1793,7 @@ function page_edit( boltSlug, pageSlug, uploadSlug, editMode, hasEditPermission, langButton.setAttribute("title","Set your preferred location"); langButton.value="+"; langButton.setAttribute("type","button"); - langButton.setAttribute("style","position:absolute;top:25%;left:90%;width:20px;"); + langButton.setAttribute("style","position:absolute;top:26%;right:4%;width:20px;"); langButton.setAttribute("alipielements", "alipi"); //locButton.setAttribute("type","button"); if (window.location.hostname != '127.0.0.1') { @@ -1821,15 +1823,14 @@ function page_edit( boltSlug, pageSlug, uploadSlug, editMode, hasEditPermission, if(document.getElementById('loc-bt').value == '+'){ //remove input field and create a combo box $('#loc-select').hide(); - var def_loc = ['Srilanka','su','sa']; - locSel = document.createElement("select"); + locSel = document.createElement("select"); locSel.setAttribute("id","loct-select"); locSel.setAttribute("type","text"); locSel.setAttribute("alipielements", "alipi"); locSel.setAttribute("style","position:absolute;top:5%;left:40%;width:250px;"); - for(i=0;i