Commit 4c06cc44131838708fe25790ddd469276d5d970f

  • avatar
  • Ajay Kulkarni <ajay @(no…e).(none)>
  • Sat Oct 22 01:01:28 IST 2011
fixed UI...
  
11051105 {
11061106 if(sib.nodeType == 1 && sib.tagName == elt.tagName)count++
11071107 }
1108
1108
11091109 return count;
11101110 };
11111111
11181118 if (idx > 1) xname += "[" + idx + "]";
11191119 path = "/" + xname + path;
11201120 }
1121
1121
11221122 return path;
11231123 };
11241124
14861486 panelButtonAttributes = fontTypeAttributes.addStyle('height:auto; cursor:pointer; float:right; font-weight:normal; font-size:14px; background-image:none; border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px; margin: 16px 16px 0 0; padding: 0 0 4px 0;-khtml-box-sizing: none;-webkit-box-sizing: none;-moz-box-sizing: none;box-sizing: none;text-shadow:none;');
14871487 editButtonAttributes = normalFontAttributes.addStyle(" height:45px;float:left; position:relative; cursor:pointer;border-top:1px solid #BDBDBD;border-left:1px solid #BDBDBD;border-right:1px solid #BDBDBD;border-bottom:1px solid #BDBDBD;color:#000;background-color:#FFF;margin: 0px;padding: 0px;");
14881488
1489 var closeButtonIconPath = './images/close_button.png';
1489 var closeButtonIconPath = 'http://dev.a11y.in/alipi/images/close_button.png';
14901490 closeButtonAttributes = editButtonAttributes.addStyle('top: -8px; left: -8px; position: absolute; border:none; background: url("' + closeButtonIconPath +'") no-repeat; width: 15px; height: 15px; z-index: 2;');
14911491
14921492 // Ajay - Redarrow is not using
16661666
16671667 // Ajay - This is ovelay for 'Saving and Loading' - changed rgba colors
16681668 backgroundDiv = DOM.BUILDER.DIV(elementAttributes.addStyle(' z-index: 2147483646; width: 100%; height: 100%; min-height: 800px; min-width: 1024px; left: 0; top: 0; position: fixed; display: none; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=87)"; filter: alpha(opacity=87); background: #fff; background: -webkit-gradient(radial, center 40%, 900, center 40%, 0, from(rgba(0, 0, 0, 0.1)), to(rgba(0, 0, 0, 0.87))); background: -moz-radial-gradient( center 40%, circle , rgba(255, 255, 255, 0) 0px , rgba(255, 255, 255, 255) 900px);').values());
1669 loadingImage = DOM.BUILDER.IMG(normalFontAttributes.put({src: './images/loading.gif'}).addStyle('position: relative; width: 24px; height: 24px; display: inline; vertical-align: middle; ').values()); // Ajay - replaced loading.gif image
1670 loadingText = DOM.BUILDER.SPAN(normalFontAttributes.addStyle('position: relative; font-size: 14px; font-weight: bold; margin-left: 10px; color:#ECECEC; display: inline; vertical-align: middle;').values(), 'Loading');
1671 loadingDiv = DOM.BUILDER.DIV(normalFontAttributes.addStyle('position: relative; width: auto; height: auto; display: block; text-align: left;').values(), loadingImage, loadingText);
1672 backgroundDiv.appendChild(loadingDiv);
1669// loadingImage = DOM.BUILDER.IMG(normalFontAttributes.put({src: './images/loading.gif'}).addStyle('position: relative; width: 24px; height: 24px; display: inline; vertical-align: middle; ').values()); // Ajay - replaced loading.gif image
1670// loadingText = DOM.BUILDER.SPAN(normalFontAttributes.addStyle('position: relative; font-size: 14px; font-weight: bold; margin-left: 10px; color:#ECECEC; display: inline; vertical-align: middle;').values(), 'Loading');
1671// loadingDiv = DOM.BUILDER.DIV(normalFontAttributes.addStyle('position: relative; width: auto; height: auto; display: block; text-align: left;').values()//, loadingImage, loadingText);
1672// backgroundDiv.appendChild(loadingDiv);
16731673
1674 messageOverlay = DOM.BUILDER.DIV(elementAttributes.addStyle('z-index: 2147483647;opacity: 1.0; box-shadow: 0px 0px 5px #000; -webkit-box-shadow: 0px 0px 5px #000; -moz-box-shadow: 0px 0px 5px #000; -moz-border-radius-topright:10px;-moz-border-radius-bottomright:10px;-moz-border-radius-topleft:10px; -moz-border-radius-bottomleft:10px;-webkit-border-top-right-radius:10px; -webkit-border-bottom-right-radius:10px;-webkit-border-top-left-radius:10px; -webkit-border-bottom-left-radius:10px; text-align:center; position:fixed; left:0px; top:0px; width:700px; height:375px; background:#000xs; display: none;background: -webkit-gradient(linear, 0% 100%, 0% 0%, from(#000), to(#202020)); background: -moz-linear-gradient(bottom, #000, #202020);').values());
1674 messageOverlay = DOM.BUILDER.DIV(elementAttributes.addStyle('z-index: 2147483647;opacity: 1.0; box-shadow: 0px 0px 5px #000; -webkit-box-shadow: 0px 0px 5px #000; -moz-box-shadow: 0px 0px 5px #000; -moz-border-radius:10px; -webkit-border-radius:10px; position:fixed; left:20%; top:20%; bottom:20%; right:20%; background:#000; display:none;').values());
16751675
1676 messageTitle = DOM.BUILDER.H1(normalFontAttributes.addStyle('position: relative; color:#FFF; width:auto; margin-top:50px; margin-bottom: 20px; font-size: 30px; line-height: 36px; text-align: center; font-weight: normal; display: block; ').values(), 'Page Editor');
1676 messageTitle = DOM.BUILDER.H1(normalFontAttributes.addStyle('position:fixed; top:23%; left:44%; color:#FFF; font-size: 30px; line-height:36px; font-weight: normal; text-decoration:none;').values(), 'Page Editor');
16771677
16781678 messageOverlay.appendChild(messageTitle);
16791679
1680 messageDescription = DOM.BUILDER.P(normalFontAttributes.addStyle('color:#FFF; font-weight: normal; font-size: 14px; line-height: 22px; width:450px; margin-left: auto; margin-right: auto; text-align: center;').values(), 'Click on any part of the page, and you will activate buttons that allow you to modify text, replace images and add audio. Just refresh your page to exit from editing without saving your changes. Don\'t forget to hit "Publish" when you\'re finished editing so we can save your newly-crafted page.');
1680 messageDescription = DOM.BUILDER.P(normalFontAttributes.addStyle('position:fixed; top:32%; left:22%; right:22%; text-align:justify; color:#FFF; font-weight: normal; font-size: 16px; line-height:24px;').values(), 'Click on any part of the page, and you will activate buttons that allow you to modify text, replace images and add audio. Just refresh your page to exit from editing without saving your changes. Don\'t forget to hit "Publish" when you\'re finished editing so we can save your newly-crafted page.');
16811681 messageOverlay.appendChild(messageDescription);
16821682
1683 var image = DOM.BUILDER.IMG(normalFontAttributes.put({src: 'https://bo.lt/app/asset/page-edit/pencil_white_16.png?p=622fd096a39f5c36a6e06e41a9963dafaad61079'}).addStyle('position: relative; margin-right: 10px; vertical-align: middle;').values());
1683// var image = DOM.BUILDER.IMG(normalFontAttributes.put({src: 'https://bo.lt/app/asset/page-edit/pencil_white_16.png?p=622fd096a39f5c36a6e06e41a9963dafaad61079'}).addStyle('position: relative; margin-right: 10px; vertical-align: middle;').values());
16841684 var text = DOM.BUILDER.SPAN(normalFontAttributes.addStyle('position: relative; line-height: 18px; height: 18px; font-size: 18px; margin-right: auto; vertical-align: middle;display: inline-block; float: none; ').values(), 'OK');
16851685
16861686 // Ajay - Changed lot of colors - Not using, not sure
1687 editButton = DOM.BUILDER.BUTTON(panelButtonAttributes.addStyle('color:#FFF; margin-left: auto; margin-right: auto; width: 100px; height: 36px; display: block; float: none; margin-top: 30px; margin-bottom: 30px; background: #777; background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #777), color-stop(1, #fff)); background: -moz-linear-gradient(center bottom, #777 0%, #fff 100%); border: 1px solid #777; border-radius: 3px; border: 1px solid #777; box-shadow: #fff 0px 0px 2px 0px inset, rgba(0, 0, 0, .5) 0px 0px 2px 0px; -moz-box-shadow:#fff 0px 0px 2px 0px inset, rgba(0, 0, 0, .5) 0px 0px 2px 0px; -webkit-box-shadow:#fff 0px 0px 2px 0px inset, rgba(0, 0, 0, .5) 0px 0px 2px 0px;').values());
1687 editButton = DOM.BUILDER.BUTTON(panelButtonAttributes.addStyle('position:fixed; left:46%; bottom:23%; color:#FFF; margin-left: auto; margin-right: auto; width: 100px; height:36px; background: #777; background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #777), color-stop(1, #fff)); background: -moz-linear-gradient(center bottom, #777 0%, #fff 100%); border: 1px solid #777; border-radius: 3px; border: 1px solid #777; box-shadow: #fff 0px 0px 2px 0px inset, rgba(0, 0, 0, .5) 0px 0px 2px 0px; -moz-box-shadow:#fff 0px 0px 2px 0px inset, rgba(0, 0, 0, .5) 0px 0px 2px 0px; -webkit-box-shadow:#fff 0px 0px 2px 0px inset, rgba(0, 0, 0, .5) 0px 0px 2px 0px;').values());
16881688 editButton.onclick = function loadingEditButtonOnClick() {
16891689 messageOverlay.style.display = 'none';
16901690 backgroundDiv.style.display = 'none';
17181718 if (textToDisplay) {
17191719 DOM.textContent(textToDisplay);
17201720 }
1721 var screenSize = DOM.viewDimension();
1722 backgroundDiv.style.minWidth = screenSize[0] + 'px';
1723 backgroundDiv.style.minHeight = screenSize[1] + 'px';
1721 // var screenSize = DOM.viewDimension();
1722 // backgroundDiv.style.minWidth = screenSize[0] + 'px';
1723 // backgroundDiv.style.minHeight = screenSize[1] + 'px';
17241724
1725 messageOverlay.style.left = (screenSize[0] - parseInt(messageOverlay.style.width) ) / 2 + 'px';
1726 messageOverlay.style.top = (screenSize[1] - parseInt(messageOverlay.style.height) ) / 2 + 'px';
1727 loadingDiv.style.left = (screenSize[0] - parseInt(loadingImage.style.width) ) / 2 + 'px';
1728 loadingDiv.style.top = (screenSize[1] - parseInt(loadingImage.style.height) ) / 2 + 'px';
1725 // messageOverlay.style.left = (screenSize[0] - parseInt(messageOverlay.style.width) ) / 2 + 'px';
1726 // messageOverlay.style.top = (screenSize[1] - parseInt(messageOverlay.style.height) ) / 2 + 'px';
1727 // loadingDiv.style.left = (screenSize[0] - parseInt(loadingImage.style.width) ) / 2 + 'px';
1728 // loadingDiv.style.top = (screenSize[1] - parseInt(loadingImage.style.height) ) / 2 + 'px';
17291729
17301730 backgroundDiv.style.display = 'block';
17311731
17801780 // slow to load.
17811781
17821782 // Ajay - This is ovelay for 'Saving and Loading' - changed rgba colors
1783 backgroundDiv = DOM.BUILDER.DIV(elementAttributes.put({id : 'bgdiv'}).addStyle(' z-index: 2147483646; width: 100%; height: 100%; min-height: 800px; min-width: 1024px; left: 0; top: 0; position: fixed; display: none; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=87)"; filter: alpha(opacity=87); background: #fff; background: -webkit-gradient(radial, center 40%, 900, center 40%, 0, from(rgba(0, 0, 0, 0.1)), to(rgba(0, 0, 0, 0.87))); background: -moz-radial-gradient( center 40%, circle , rgba(255, 255, 255, 0) 0px , rgba(255, 255, 255, 255) 900px);').values());
1784 loadingText = DOM.BUILDER.SPAN(normalFontAttributes.addStyle('position: relative; font-size: 14px; font-weight: bold; margin-left: 10px; color:#ECECEC; display: inline; vertical-align: middle;').values(), 'Loading');
1785 loadingDiv = DOM.BUILDER.DIV(normalFontAttributes.addStyle('position: relative; width: auto; height: auto; display: block; text-align: left;').values(), loadingText);
1786 backgroundDiv.appendChild(loadingDiv);
1783 backgroundDiv = DOM.BUILDER.DIV(elementAttributes.put({id : 'bgdiv'}).addStyle(' z-index: 2147483646; width: 100%; height: 100%; left: 0; top: 0; position: fixed; display: none; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=87)"; filter: alpha(opacity=87); background: #fff; background: -webkit-gradient(radial, center 40%, 900, center 40%, 0, from(rgba(0, 0, 0, 0.1)), to(rgba(0, 0, 0, 1))); background: -moz-radial-gradient( center 40%, circle , rgba(255, 255, 255, 0) 0px , rgba(255, 255, 255, 255) 900px);').values());
1784// loadingDiv = DOM.BUILDER.DIV(normalFontAttributes.addStyle('position: relative; width: auto; height: auto; display: block; text-align: left;').values());
1785// backgroundDiv.appendChild(loadingDiv);
17871786
1788 messageOverlay = DOM.BUILDER.DIV(elementAttributes.put({id : 'msgoverlay'}).addStyle('z-index: 2147483647;opacity: 1.0; box-shadow: 0px 0px 5px #000; -webkit-box-shadow: 0px 0px 5px #000; -moz-box-shadow: 0px 0px 5px #000; -moz-border-radius-topright:10px;-moz-border-radius-bottomright:10px;-moz-border-radius-topleft:10px; -moz-border-radius-bottomleft:10px;-webkit-border-top-right-radius:10px; -webkit-border-bottom-right-radius:10px;-webkit-border-top-left-radius:10px; -webkit-border-bottom-left-radius:10px; position:fixed; left:10px; top:10px; bottom:10px; right:10px; width:98%; height:98%; background:#000; display:none; background: -webkit-gradient(linear, 0% 100%, 0% 0%, from(#000), to(#202020)); background: -moz-linear-gradient(bottom, #000, #202020);').values());
1787 messageOverlay = DOM.BUILDER.DIV(elementAttributes.put({id : 'msgoverlay'}).addStyle('z-index: 2147483647;opacity: 1.0; box-shadow: 0px 0px 5px #000; -webkit-box-shadow: 0px 0px 5px #000; -moz-box-shadow: 0px 0px 5px #000; -moz-border-radius:10px; -webkit-border-radius:10px; position:fixed; left:5%; top:5%; bottom:5%; right:5%; background:#000; display:none; vertical-align:middle;').values());
17891788
17901789 step1 = DOM.BUILDER.H1(normalFontAttributes.addStyle('position: relative; color:#FFF; width:auto; font-size: 22px; line-height: 36px; text-align: center; font-weight: normal; display: block; ').values(), 'Please provide all the details below');
17911790
17921791 messageOverlay.appendChild(step1);
17931792
1794 var image = DOM.BUILDER.IMG(normalFontAttributes.put({src: '../images/close_button.png'}).addStyle('position: relative; margin-right: 10px; vertical-align: middle;').values());
1793 var image = DOM.BUILDER.IMG(normalFontAttributes.put({src: 'http://dev.a11y.in/alipi/images/close_button.png'}).addStyle('position:fixed; top:3%; right:4%; width:25px; height:25px;').values());
17951794 var text = DOM.BUILDER.SPAN(normalFontAttributes.addStyle('position: relative; line-height: 18px; height: 18px; font-size: 18px; margin-right: auto; vertical-align: middle;display: inline-block; float: none;').values(), 'OK');
17961795
1797 //---------------------------- state & language target --------------------------
1798 locSelectAttributes = panelButtonAttributes.addStyle('position:absolute; top:25%; left:05%; width:23%; color:#FFF; text-align:center; background: #222; border:3px solid; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px; font-size:14px;').values();
1799 locSelectLabel = DOM.BUILDER.LABEL(normalFontAttributes.addStyle('position:absolute; top:24%; left:05%; width:auto; font-size: 14px; font-weight: bold; background: transparent; color: #FFF; display:inline-block;').values());
1800 locSelectLabel.innerHTML = 'Select any state';
1796 image.onclick=function(){
1797 document.getElementById("msgoverlay").style.display = "none";
1798 document.getElementById("bgdiv").style.display = "none";
1799 }
18011800
1802 langSelectAttributes = panelButtonAttributes.addStyle('position:absolute; top:50%; left:05%; width:23%; color:#FFF; text-align:center; background: #222; border:3px solid; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px; font-size:14px;').values();
1803 langSelectLabel = DOM.BUILDER.LABEL(normalFontAttributes.addStyle('position:absolute; top:49%; left:05%; font-size: 14px; font-weight: bold; background: transparent; color: #FFF;display: inline-block;').values());
1804 langSelectLabel.innerHTML = 'Languages of selected/all state(s)';
18051801
1806 enterBlogAttributes = panelButtonAttributes.put({placeholder : 'http://abc.blogspot.com/', type : 'text'}).addStyle('position:absolute; top:25%; left:36%; width:23%; color:#FFF; text-align:center; background: #222; border:3px solid; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px; font-size:14px;').values();
1807 enterBlogLabel = DOM.BUILDER.LABEL(normalFontAttributes.addStyle('position:absolute; top:23%; left:36%; font-size: 14px; font-weight: bold; background: transparent; color: #FFF;display: inline-block;').values());
1802 //---------------------------- state & language target --------------------------
1803 locSelectLabel = DOM.BUILDER.LABEL(normalFontAttributes.addStyle('position:fixed; top:20%; left:10%; font-size: 14px; font-weight: bold; background: transparent; color: #FFF;').values());
1804 locSelectLabel.innerHTML = 'Select any state';
1805 enterBlogLabel = DOM.BUILDER.LABEL(normalFontAttributes.addStyle('position:fixed; top:20%; left:40%; font-size: 14px; font-weight: bold; background: transparent; color: #FFF;').values());
18081806 enterBlogLabel.innerHTML = 'Enter your blog URL';
1807 enterMailIdLabel = DOM.BUILDER.LABEL(normalFontAttributes.addStyle('position:fixed; top:20%; left:70%; font-size: 14px; font-weight: bold; background: transparent; color: #FFF;').values());
1808 enterMailIdLabel.innerHTML = 'USERNAME';
18091809
1810 defaultBlogAttributes = DOM.BUILDER.INPUT(editAttributes.put({ name : 'Loading Checkbox', type : 'checkbox'}).addStyle('position:absolute; top:54%; left:36%; background: transparent; display: inline-block;').values());
1811 defaultBlogLabel = DOM.BUILDER.LABEL(normalFontAttributes.addStyle('position:absolute; top:55%; left:39%; font-size: 14px; font-weight: bold; background: transparent; color: #FFF;display: inline-block;').values());
1812 defaultBlogLabel.innerHTML = 'Default blog (Our blog)';
18131810
1814 enterMailIdAttributes = panelButtonAttributes.put({placeholder : 'username@gmail.com', type : 'text'}).addStyle('position:absolute; top:25%; left:70%; width:23%; color:#FFF; text-align:center; background: #222; border:3px solid; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px; font-size:14px;').values();
1815 enterMailIdLabel = DOM.BUILDER.LABEL(normalFontAttributes.addStyle('position:absolute; top:23%; left:70%; font-size: 14px; font-weight: bold; background: transparent; color: #FFF;display: inline-block;').values());
1816 enterMailIdLabel.innerHTML = 'USERNAME';
1811 locSelectAttributes = panelButtonAttributes.put({ id : 'loc-select'}).addStyle('position:fixed; top:21%; left:10%; width:220px; color:#FFF; text-align:center; background: #222; border:3px solid; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px; font-size:14px;').values();
1812 enterBlogAttributes = panelButtonAttributes.put({id : 'enter-blog', placeholder : 'http://abc.blogspot.com/', type : 'text'}).addStyle('position:fixed; top:21%; left:40%; width:220px; color:#FFF; text-align:center; background: #222; border:3px solid; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px; font-size:14px;').values();
1813 enterMailIdAttributes = panelButtonAttributes.put({id : 'enter-mail', placeholder : 'username@gmail.com', type : 'text'}).addStyle('position:fixed; top:21%; left:70%; width:220px; color:#FFF; text-align:center; background: #222; border:3px solid; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px; font-size:14px;').values();
18171814
18181815
1819 enterPwdAttributes = panelButtonAttributes.put({placeholder : 'password', type : 'password'}).addStyle('position:absolute; top:50%; left:70%; width:23%; color:#FFF; text-align:center; background: #222; border:3px solid; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px; font-size:14px;').values();
1820 enterPwdLabel = DOM.BUILDER.LABEL(normalFontAttributes.addStyle('position:absolute; top:49%; left:70%; font-size: 14px; font-weight: bold; background: transparent; color: #FFF;display: inline-block;').values());
1816 langSelectLabel = DOM.BUILDER.LABEL(normalFontAttributes.addStyle('position:fixed; top:50%; left:10%; font-size: 14px; font-weight: bold; background: transparent; color: #FFF;display: inline-block;').values());
1817 langSelectLabel.innerHTML = 'Languages of selected/all state(s)';
1818 enterPwdLabel = DOM.BUILDER.LABEL(normalFontAttributes.addStyle('position:fixed; top:50%; left:70%; font-size: 14px; font-weight: bold; background: transparent; color: #FFF;display: inline-block;').values());
18211819 enterPwdLabel.innerHTML = 'PASSWORD';
18221820
1821 langSelectAttributes = panelButtonAttributes.put({ id : 'lang-select'}).addStyle('position:fixed; top:51%; left:10%; width:220px; color:#FFF; text-align:center; background: #222; border:3px solid; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px; font-size:14px;').values();
1822 defaultBlogAttributes = DOM.BUILDER.INPUT(editAttributes.put({id : 'defaultcheck', name : 'Loading Checkbox', type : 'checkbox'}).addStyle('position:fixed; top:51%; left:40%; background: transparent; display: inline-block;').values());
1823 defaultBlogLabel = DOM.BUILDER.LABEL(normalFontAttributes.addStyle('position:fixed; top:51.5%; left:42%; font-size: 14px; font-weight: bold; background: transparent; color: #FFF;display: inline-block;').values());
1824 defaultBlogLabel.innerHTML = 'Default blog (Our blog)';
1825 enterPwdAttributes = panelButtonAttributes.put({id : 'enter-pwd', placeholder : 'password', type : 'password'}).addStyle('position:fixed; top:51%; left:70%;width:220px; color:#FFF; text-align:center; background: #222; border:3px solid; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px; font-size:14px;').values();
18231826
18241827 //-----------------------------End of state & language target -------------------
18251828
18301830 okButton = DOM.BUILDER.BUTTON(panelButtonAttributes.addStyle('position:absolute; left:44%; bottom:5%; color:#FFF; margin:auto; width: 100px; height: 36px; display: block; background: #777; background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #777), color-stop(1, #fff)); background: -moz-linear-gradient(center bottom, #777 0%, #fff 100%); border: 1px solid #777; border-radius: 3px; border: 1px solid #777; box-shadow: #fff 0px 0px 2px 0px inset, rgba(0, 0, 0, .5) 0px 0px 2px 0px; -moz-box-shadow:#fff 0px 0px 2px 0px inset, rgba(0, 0, 0, .5) 0px 0px 2px 0px; -webkit-box-shadow:#fff 0px 0px 2px 0px inset, rgba(0, 0, 0, .5) 0px 0px 2px 0px;').values());
18311831
18321832 this.okClick = function okClick() {
1833 messageOverlay.style.display = 'none';
1834 backgroundDiv.style.display = 'none';
1833 if(document.getElementById('loc-select').value == '--Locations--' || document.getElementById('lang-select').value == '---Languages---') {
1834 alert('Please select a Location & Language');
1835 }
1836 else {
1837 overlayBar = new OverlayBar(pageEditor);
1838 overlayBar.blogpost();
1839 messageOverlay.style.display = 'none';
1840 backgroundDiv.style.display = 'none';
1841
1842 }
18351843 // self.hide();
18361844 // return false;
18371845 };
1838 // editButton.appendChild(image);
1846 // editButton.appendChild(image);
18391847 okButton.appendChild(text);
18401848 messageOverlay.appendChild(okButton);
1849 messageOverlay.appendChild(image);
18411850
1851
18421852 //---------------------------------------------start locLang & locSelect -----------------------
18431853
18441854 locSelect = DOM.BUILDER.SELECT(locSelectAttributes);
19891989 if (textToDisplay) {
19901990 DOM.textContent(textToDisplay);
19911991 }
1992 var screenSize = DOM.viewDimension();
1993 backgroundDiv.style.minWidth = screenSize[0] + 'px';
1994 backgroundDiv.style.minHeight = screenSize[1] + 'px';
1992 // var screenSize = DOM.viewDimension();
1993 // backgroundDiv.style.minWidth = screenSize[0] + 'px';
1994 // backgroundDiv.style.minHeight = screenSize[1] + 'px';
19951995
1996 messageOverlay.style.left = (screenSize[0] - parseInt(messageOverlay.style.width) ) / 2 + 'px';
1997 messageOverlay.style.top = (screenSize[1] - parseInt(messageOverlay.style.height) ) / 2 + 'px';
1998 loadingDiv.style.left = (screenSize[0] - parseInt(loadingImage.style.width) ) / 2 + 'px';
1999 loadingDiv.style.top = (screenSize[1] - parseInt(loadingImage.style.height) ) / 2 + 'px';
1996 // messageOverlay.style.left = (screenSize[0] - parseInt(messageOverlay.style.width) ) / 2 + 'px';
1997 // messageOverlay.style.top = (screenSize[1] - parseInt(messageOverlay.style.height) ) / 2 + 'px';
1998 // loadingDiv.style.left = (screenSize[0] - parseInt(loadingImage.style.width) ) / 2 + 'px';
1999 // loadingDiv.style.top = (screenSize[1] - parseInt(loadingImage.style.height) ) / 2 + 'px';
20002000
20012001 backgroundDiv.style.display = 'block';
20022002
28222822
28232823
28242824 var renImage = 'http://dev.a11y.in/alipi/images/renarration.png';
2825 renButton = createActionButton(renImage, 'Renarration', 'border-right: none;');
2825 renButton = createActionButton(renImage, 'See narrations', 'border-right: none;');
28262826 renButton.onclick = function renButtonOnClick() {
28272827 popupControl.showAction(renUpdateAction);
28282828 //self.popdown(true);
29652965
29662966
29672967 var renImage = 'http://dev.a11y.in/alipi/images/renarration.png';
2968 renButton = createActionButton(renImage, 'Renarration', 'border-right: none;');
2968 renButton = createActionButton(renImage, 'See (other) narrations', 'border-right: none;');
29692969 renButton.onclick = function renButtonOnClick() {
29702970 popupControl.showAction(renUpdateAction);
29712971 //self.popdown(true);
29822982 self.popdown();
29832983 };
29842984
2985 var audioImage = './images/audio.png';
2985 var audioImage = 'http://dev.a11y.in/alipi/images/audio.png';
29862986 audioButton = createActionButton(audioImage,'Audio','border-right:none;');
29872987 audioButton.onclick = function audioButtonOnClick() {
29882988 popupControl.showAction(audioUpdateAction);
31193119 messageDiv = DOM.BUILDER.DIV(editAttributes.addStyle('font-weight:italic; font-size:20px; font-family: Helvetica Neue,Helvetica,Arial,Sans-serif; position:absolute; left:30%; width:100%; display:inline-block; color:#fff;').values());
31203120
31213121 // Ajay - background-color & rgba changed
3122 redButtonStyleAttributes = panelButtonAttributes.addStyle('position:absolute; top:-13px; right:04%; width:30%; height:25px; color:#FFF; font-size:18px; text-align:center; background: #AAA; background: -moz-linear-gradient(center bottom, #000 0%, #FFF 100%); -webkit-linear-gradient(center bottom, #000 0%, #FFF 100%); border: 1px solid #777; border-radius: 3px; -moz-border-radius:10px; -webkit-border-radius:3px; border: 1px solid #777;').values();
3122 redButtonStyleAttributes = panelButtonAttributes.addStyle('position:absolute; top:-13px; right:04%; width:22%; height:25px; color:#FFF; font-size:18px; text-align:center; background: #AAA; background: -moz-linear-gradient(center bottom, #000 0%, #FFF 100%); -webkit-linear-gradient(center bottom, #000 0%, #FFF 100%); border: 1px solid #777; border-radius: 3px; -moz-border-radius:10px; -webkit-border-radius:3px; border: 1px solid #777;').values();
31233123
31243124 //Ajay - button for filling up the target and other detail
31253125 // fillUpButtonStyleAttributes = panelButtonAttributes.addStyle('position:absolute; top:-13px; right:30%; width:20%; height:25px; color:#FFF; font-size:18px; text-align:center; background: #AAA; background: -moz-linear-gradient(center bottom, #000 0%, #FFF 100%); -webkit-linear-gradient(center bottom, #000 0%, #FFF 100%); border: 1px solid #777; border-radius: 3px; -moz-border-radius:10px; -webkit-border-radius:3px; border: 1px solid #777;').values();
31493149 // }
31503150 // };
31513151
3152 publishButton = DOM.BUILDER.BUTTON(redButtonStyleAttributes, 'Fill-up & Publish'); // Ajay - Done to Save Yass
3152 publishButton = DOM.BUILDER.BUTTON(redButtonStyleAttributes, 'Publish'); // Ajay - Done to Save Yass
31533153 //pageEditor.saveAndClose();
3154
31543155 publishButton.onclick = function publishButtonOnClick() {
3155 ajayWindow = new AjayWindow(pageEditor);
3156 ajayWindow.activate();
3157 okButton.onclick = function okButtonOnClick() { // Ajay
3158 ajayWindow.okClick();
31593156
3160 if (pageEditor.hasChangesPending() /* && (pageEditor.formUncomplete() ==false) */ ) {
3161 pageEditor.commandPublish();
3162 this.disabled=true;
3163 pageEditor.showMessage("... Please wait, your blog is being posted");
3157 if (pageEditor.hasChangesPending() /* && (pageEditor.formUncomplete() ==false) */ ) {
3158 ajayWindow = new AjayWindow(pageEditor);
3159 ajayWindow.activate();
3160
3161 okButton.onclick = function okButtonOnClick() { // Ajay
3162 ajayWindow.okClick();
31643163 }
3165 // else if ((pageEditor.hasChangesPending() ==false)&& (pageEditor.formUncomplete() == false)){
3166 // pageEditor.showMessage(" Nothing to publish !");
3167 // }
3168 // else if (pageEditor.hasChangesPending()&& (pageEditor.formUncomplete() ==true)){
3169 // pageEditor.showMessage("you need to choose at least a language, a location or a style before you can save & publish !");
3170 // }
3171 else{
3172 pageEditor.showMessage("Nothing to publish");
3173 }
3174 return false;
3175 };
3176 }; // End of okButton function
3164 }
3165// else if ((pageEditor.hasChangesPending() ==false)&& (pageEditor.formUncomplete() == false)){
3166// pageEditor.showMessage(" Nothing to publish !");
3167// }
3168// else if (pageEditor.hasChangesPending()&& (pageEditor.formUncomplete() ==true)){
3169// pageEditor.showMessage("you need to choose at least a language, a location or a style before you can save & publish !");
3170// }
3171 else{
3172 pageEditor.showMessage("Nothing to publish");
3173 }
3174 return false;
3175 };
3176
3177 this.blogpost = function blogpost() {
3178 pageEditor.commandPublish();
3179 this.disabled=true;
3180 pageEditor.showMessage("... Please wait, your blog is being posted");
3181 };
3182 // End of okButton function
31773183
31783184 //shalini-Yass
31793185 /* cancelButton = DOM.BUILDER.BUTTON(cancelButtonStyleAttributes, 'Cancel');