Commit 5dfb196caa863fbc0098bb4222ee1fbfc0e9c2ea

  • avatar
  • Ajay kulkarni <ajaykools @gm…l.com>
  • Mon May 14 13:31:55 IST 2012
Title for all buttons & browser indepented CSS
  
127127 g.root.body.append(style_cust)
128128
129129def setSocialScript():
130 see_orig = g.root.makeelement('input')
130 info_button = g.root.makeelement('button')
131 g.root.body.append(info_button)
132 info_button.set("id", "info")
133 info_button.set("class", "alipi")
134 info_button.set("onClick", "a11ypi.showInfo();")
135 info_button.text = "Info"
136 info_button.set("title", "Have a look at the information of each renarrated element")
137
138 share_button = g.root.makeelement('button')
139 g.root.body.append(share_button)
140 share_button.set("id", "share")
141 share_button.set("class", "alipi")
142 share_button.set("onClick", "a11ypi.share();")
143 share_button.text = "Share"
144 share_button.set("title", "Share your contribution in your social network")
145
146 see_orig = g.root.makeelement('button')
131147 g.root.body.append(see_orig)
132148 see_orig.set("id", "orig-button")
133149 see_orig.set("class", "alipi")
134 see_orig.set("type", "submit")
135150 see_orig.set("onClick", "a11ypi.showOriginal();")
136 see_orig.set("value", "Original page")
137 see_orig.set("style","display:none;")
138
151 see_orig.text = "Original Page"
152 see_orig.set("title", "Go to Original link, the original page of this renarrated")
153
139154 tweetroot = g.root.makeelement("div")
140155 tweetroot.set("id", "tweet-root")
141156 tweetroot.set("class", "alipi")
  
11@media screen and (min-width:1000px) {
22
3/* .alipi { font-weight:normal; font-size:100%; } */
3#renarrated_overlay { position:fixed; left:0.5%; width:99%; text-align:center; font-weight:normal; z-index:2147483645; display:block; }
44
5#renarrated_overlay { position:fixed; left:0.5%; width:99%; text-align:center; font-weight:normal; z-index:2147483645; display:block; }
6/* #renarrated_overlay .ui-button { text-align:justify; } */
7
85#edit-current { font-size:17px; font-weight:400; font-style:italic; text-align:justify; display:none; }
96#see-narration { font-size:17px; font-weight:400; font-style:italic; text-align:justify; display:none; }
107#see-links { font-size:17px; font-weight:400; font-style:italic; text-align:justify; display:none; }
11#go { height:37px; font-size:17px; font-weight:400; font-style:italic; -moz-border-radius-bottomleft:0px; -webkit-border-bottom-left-radius:0px;
12 -khtml-border-bottom-left-radius:0px; border-bottom-left-radius:0px; -moz-border-radius-topleft:0px;
13 -webkit-border-top-left-radius:0px; -khtml-border-top-left-radius:0px; border-top-left-radius:0px; text-align:justify; display:none; }
14#blog-filter { right:-3px; min-width:225px; max-width:225px; height:37px; font-size:17px; font-weight:400; font-style:italic;
15 -moz-border-radius-bottomright:0px; -webkit-border-bottom-right-radius:0px; -khtml-border-bottom-right-radius:0px;
16 border-bottom-right-radius:0px; -moz-border-radius-topright:0px; -webkit-border-top-right-radius:0px; -khtml-border-top-right-radius:0px;
17 border-top-right-radius:0px; -moz-border-radius-bottomleft:5px; -webkit-border-bottom-left-radius:5px; border-bottom-left-radius:5px;
18 -moz-border-radius-topleft:5px; -webkit-border-top-left-radius:5px; -khtml-border-top-left-radius:5px; border-top-right-radius:0px;
19 text-align:justify; display:none; }
8#blog-filter { right:-3px; min-width:225px; max-width:225px; font-size:17px; font-weight:400; font-style:italic;
9 -moz-border-radius-bottomright:0px; -webkit-border-bottom-right-radius:0px; border-bottom-right-radius:0px;
10 -moz-border-radius-topright:0px; -webkit-border-top-right-radius:0px; border-top-right-radius:0px; -moz-margin-start:7px;
11 text-align:center; display:none; }
12@-moz-document domain(127.0.0.1), domain(dev.a11y.in), domain(y.a11y.in) {
13 #go { top:11px !important; }
14}
15#go { top:6px; height:25px; text-align:justify; display:none;
16 -moz-border-radius-bottomleft:0px; -webkit-border-bottom-left-radius:0px; border-bottom-left-radius:0px;
17 -moz-border-radius-topleft:0px; -webkit-border-top-left-radius:0px; -khtml-border-top-left-radius:0px; border-top-left-radius:0px; }
18
2019#share { font-size:17px; font-weight:400; font-style:italic; text-align:justify; display:none; }
2120#orig-button { font-size:17px; font-weight:400; font-style:italic; text-align:justify; display:none; }
2221#info { font-size:17px; font-weight:400; font-style:italic; text-align:justify; display:none; }
4545#editoroverlay { min-width:90%; text-align:justify; display: none; }
4646#editoroverlay a { color:#1C94C4; }
4747
48#adv-reference { position: absolute; top:15%; left:2%; min-width:48%; max-width:48%; min-height:100%; border:solid 3px; padding:10px; font-size:17px;
48#adv-reference { position: absolute; top:15%; left:2%; min-width:48%; max-width:48%; border:solid 3px; padding:10px; font-size:16px;
4949 font-weight:400; font-style:normal; color:#aaa; overflow:show; background:none; text-align:justify; display:none; }
5050
51#reference { position: absolute; top: 15%; left:2%; min-width:46%; max-width:46%; min-height:100%; border:solid 3px; padding:10px; font-size:17px;
51#reference { position: absolute; top: 15%; left:2%; min-width:46%; max-width:46%; min-height:10%; border:solid 3px; padding:10px; font-size:17px;
5252 font-weight:400; font-style:normal; text-align:justify; color:#aaa; overflow:show; background:none; text-align:justify; }
5353
54#editor { position:absolute; top:15%; left:52%; min-width:45%; max-width:45%; min-height:96%; border:3px solid; padding:10px; font-size:17px;
54#editor { position:absolute; top:15%; left:52%; min-width:45%; max-width:45%; min-height:10%; border:3px solid #aaa; padding:10px; font-size:17px;
5555 font-weight:400; font-style:normal; text-align:justify; color:#000; background-color:#ffe; text-align:justify; }
5656
5757#ref-lab { position:absolute; top:5%; font-size:17px; font-weight:400; font-style:italic; color:#aaa; text-align:justify; }
107107#edit-current { font-size:14px; font-weight:200; font-style:italic; text-align:justify; display:none; }
108108#see-narration { font-size:14px; font-weight:200; font-style:italic; text-align:justify; display:none; }
109109#see-links { font-size:14px; font-weight:200; font-style:italic; text-align:justify; display:none; }
110#go { height:30px; -moz-border-radius-bottomleft:0px; -webkit-border-bottom-left-radius:0px; -khtml-border-bottom-left-radius:0px;
110#blog-filter { right:-3px; min-width:150px; max-width:150px; font-weight:200; font-style:italic; text-align:justify; display:none;
111 -moz-border-radius-bottomright:0px; -webkit-border-bottom-right-radius:0px; border-bottom-right-radius:0px;
112 -moz-border-radius-topright:0px; -webkit-border-top-right-radius:0px; border-top-right-radius:0px; }
113#go { top:5px; height:18px; -moz-border-radius-bottomleft:0px; -webkit-border-bottom-left-radius:0px; -khtml-border-bottom-left-radius:0px;
111114 border-bottom-left-radius:0px; -moz-border-radius-topleft:0px; -webkit-border-top-left-radius:0px; -khtml-border-top-left-radius:0px;
112115 border-top-left-radius:0px; font-size:14px; font-weight:200; font-style:italic; text-align:justify; display:none; }
113#blog-filter { right:-3px; min-width:150px; max-width:150px; height:30px; -moz-border-radius-bottomright:0px; -webkit-border-bottom-right-radius:0px;
114 -khtml-border-bottom-right-radius:0px; border-bottom-right-radius:0px; -moz-border-radius-topright:0px;
115 -webkit-border-top-right-radius:0px; -khtml-border-top-right-radius:0px; border-top-right-radius:0px; -moz-border-radius-bottomleft:5px;
116 -webkit-border-bottom-left-radius:5px; border-bottom-left-radius:5px; -moz-border-radius-topleft:5px; -webkit-border-top-left-radius:5px;
117 -khtml-border-top-left-radius:5px; border-top-right-radius:0px;font-size:14px; font-weight:200; font-style:italic; text-align:justify;
118 display:none; }
116@-moz-document domain(127.0.0.1), domain(dev.a11y.in), domain(y.a11y.in) {
117 #go { height:23px !important; top:4px !important; }
118}
119119#share { font-size:14px; font-weight:200; font-style:italic; text-align:justify; display:none; }
120120#orig-button { font-size:14px; font-weight:200; font-style:italic; text-align:justify; display:none; }
121121#info { font-size:14px; font-weight:200; font-style:italic; text-align:justify; display:none; }
148148#editoroverlay { min-width:90%; display: none; }
149149#editoroverlay a { color:#1C94C4; }
150150
151#adv-reference { position: absolute; top: 24%; left:2%; min-width:48%; max-width:48%; min-height:100%; border:solid 2px; padding:10px; font-size:14px;
151#adv-reference { position: absolute; top: 24%; left:2%; min-width:48%; max-width:48%; border:solid 2px; padding:10px; font-size:13px;
152152 text-align:justify; color:#aaa; font-weight:normal; overflow:show; background:none; display:none; }
153#reference { position: absolute; top: 24%; left:2%; min-width:46%; max-width:46%; min-height:100%; border:solid 2px; padding:10px; font-size:14px;
153#reference { position: absolute; top: 24%; left:2%; min-width:46%; max-width:46%; min-height:10%; border:solid 2px; padding:10px; font-size:14px;
154154 text-align:justify; color:#aaa; font-weight:normal; overflow:show; background:none; }
155155
156#editor { position:absolute; top:15%; left:52%; min-width:45%; max-width:45%; min-height:96%; border:2px solid; padding:10px; color:#000;
156#editor { position:absolute; top:15%; left:52%; min-width:45%; max-width:45%; min-height:10%; border:2px solid; padding:10px; color:#000;
157157 background-color:#ffe; font-size:14px; font-weight:200; font-style:normal; text-align:justify; }
158158
159159#ref-lab { position:absolute; top:5%; font-size:14px; font-weight:200; font-style:italic; text-align:justify; color:#aaa; }
server/ui.js
(30 / 25)
  
151151 value = pair[1];
152152 d[key] = value;
153153 }
154 $('#infoDiv').append(d['xpath']);
155 $('#infoDiv').append('<br>');
156154 path = d['xpath'];
157155 newContent = d['data'];
158156 elementType = d['elementtype'];
334334 var overlay_template = '<div id="renarrated_overlay" class="alipi ui-widget-header ui-corner-all">'+
335335 '<button id="outter-down-button" class="alipi" onclick="a11ypi.outterToggle();" up="true" title="Move this bar to top">Move</button> '+
336336 '<button id="outter-up-button" class="alipi" onclick="a11ypi.outterToggle();" title="Move this bar to bottom">Move</button> '+
337 '<button id="edit-current" class="alipi" onclick="a11ypi.editPage();" title="Re-narrate this page">Re-narrate</button> '+
337 '<button id="edit-current" class="alipi" onclick="a11ypi.editPage();" title="Allow to edit this page">Re-narrate</button> '+
338338 '<button id="see-narration" class="alipi" onclick="a11ypi.showBox();" title="See other renarrations, which are in same or other languages"> '+
339339 'Re-narrations</button>'+
340340 '<button id="see-links" class="alipi" onclick="a11ypi.showBox1();" title="See other re-narrated pages of this domain">Re-narrated Pages '+
341341 '</button>'+
342342 '<select id="blog-filter" class="alipi" onChange="a11ypi.checkSelect();" title="Select one of the blog name"></select>'+
343343 '<button id="go" class="alipi ui-icon-circle-arrow-e" onclick="a11ypi.go();" title="Filter by blog" >|Y|</button>'+
344 '<button id="share" class="alipi" onclick="a11ypi.share();" title="Share your contribution in your social network">Share</button>'+
345 '<button id="orig-button" class="alipi" onclick="a11ypi.showOriginal();" title="Go to Original link, the original page of this renarrated"> '+
346 'Original Page</button>'+
347 '<button id="info" class="alipi" onclick="" title="Have a look at the information of each renarrated element">Info</button> </div>'+
348344 '<div id="show-box" title="Choose a narration"></div> '+
349345 '<div id="show-links" title="List of pages narrated in this domain" class="alipi"></div> '+
350346 '<div id="share-box" class="alipi" title="Share this page in any following social network"></div>';
348348 var pub_overlay_template = '<div id="pub_overlay" class="alipi ui-widget-header ui-corner-all">'+
349349 '<button id="icon-up" class="alipi" down="true" onClick="a11ypi.hide_overlays();" title="Move this bar to top">Move</button>'+ //&#x25B2
350350 '<button id="icon-down" class="alipi" onClick="a11ypi.hide_overlays();" title="Move this bar to bottom">Move</button>'+ //&#x25BC
351 '<button id="exit-mode" class="alipi" onclick="a11ypi.exitMode();" title="Exit from editing mode">Exit</button>'+
352 '<button id="help-window" class="alipi" onclick="a11ypi.help_window();" title="How to help you in editing this page">Help</button>'+
353 '<button id="undo-button" class="alipi" onclick="util.undoChanges();"title="Undo previous changes, one by one">Undo change</button>'+
351 '<button id="exit-mode" class="alipi" onclick="a11ypi.exitMode();" title="Do not want to save any changes, just take me out of this editing"> '+
352 'Exit</button>'+
353 '<button id="help-window" class="alipi" onclick="a11ypi.help_window();" title="How may I help you in editing this page?">Help</button>'+
354 '<button id="undo-button" class="alipi" onclick="util.undoChanges();"title="Undo previous change, one by one">Undo changes</button>'+
354355 '<button id="publish-button" class="alipi" onclick="a11ypi.publish();"title="Publish your changes to blog">Publish</button></div>';
355356
356357 var element_edit_overlay_template = '<div id="element_edit_overlay" class="alipi ui-widget-header ui-corner-all" >'+
357 '<button id="edit-text" class="alipi" onclick="a11ypi.displayEditor();" title="Help you to edit this element by providing an editor '+
358 'with reference on left.">Edit Text</button>'+
359 '<button id="add-audio" class="alipi" onclick="a11ypi.addAudio();" title="Allow you to give an audio file(.ogg) link to add to this '+
360 'element ">Add Audio</button>'+
358 '<button id="edit-text" class="alipi" onclick="a11ypi.displayEditor();" title="Help you to edit this element by providing an editor on right'+
359 ' & reference on left.">Edit Text</button>'+
360 '<button id="add-audio" class="alipi" onclick="a11ypi.addAudio();" title="Allow you to give an audio file(.ogg) link to add your audio '+
361 'to this element ">Add Audio</button>'+
361362 '<button id="replace-image" class="alipi" onclick="a11ypi.imageReplacer();" title="Allow you to give an image file(jpeg/jpg/gif/png) '+
362363 'link to replace with this image">Replace Image</button>'+
363364 '<button id="delete-image" class="alipi" onclick="pageEditor.deleteImage();" title="Remove this image from page">Delete Image</button>'+
364365 '<button id="close-element" class="alipi" onclick="pageEditor.cleanUp();" title="Close" ></button>'+
365 '<label id="cant-edit" class="alipi">No selection / Too large to select </label> '+
366 '<label id="cant-edit" class="alipi">No selection / Too large selection </label> '+
366367 '</div>';
367368
368369 $('body').append(overlay_template);
416416 } else {
417417 }
418418
419 if($('#orig-button').val() == 'Original Page') {
420 $('#orig-button').show();;
421 $('#share-box').append($('#fb-like'));
422 $('#share-box').append($('#tweet-root'));
423 $('#share').show();
419 if($('#orig-button').text() == 'Original Page') {
420 $('#renarrated_overlay').append($('#share')); $('#share').show();
421 $('#renarrated_overlay').append($('#info')); $('#info').show();
422 $('#renarrated_overlay').append($('#orig-button')); $('#orig-button').show();
423 $('#share-box').append($('#fb-like')); $('#share-box').append($('#tweet-root'));
424424 }
425425 },
426426 checkSelect: function()
818818
819819 displayEditor: function() {
820820 var template = '<div id="editoroverlay" title="Editor" class="alipi ui-widget-header ui-corner-all">'+
821 '<div id="close-adv" class="alipi" onclick="a11ypi.closeAdv();">Render source</div><div id="adv-ref" class="alipi" '+
822 'onclick="a11ypi.showAdv();">View Source</div> '+
823 '<label id="ref-lab" class="alipi" style="left:3%;">Here is original piece</label>'+
821 '<button id="close-adv" class="alipi" onclick="a11ypi.closeAdv();" title="Want to close View Source & display without HTML code?"> '+
822 'Render source</button> '+
823 '<button id="adv-ref" class="alipi" onclick="a11ypi.showAdv();" title="Want to see HTML code? Then click me !!">View Source</button> '+
824 '<label id="ref-lab" class="alipi" style="left:3%;">Here is original piece (Reference)</label>'+
824825 '<div id="reference" class="alipi" readonly="yes"></div>'+
825826 '<textarea id="adv-reference" class="alipi" readonly="yes"></textarea> '+
826 '<label id="edit-lab" class="alipi" style="left:53%;">Where you should edit</label>'+
827 '<label id="edit-lab" class="alipi" style="left:53%;">Where you should edit (Editor)</label>'+
827828 '<div id="editor" class="alipi" contenteditable="true" '+ // onkeyup="a11ypi.reflectInReference();">
828829// '<div id="forPrevData" class="alipi"></div>'+
829830 '</div>';
840840 $('#adv-reference').text('<'+tag+'>'+$(pageEditor.event.target).html()+'</'+tag+'>');
841841 $('#reference').html($(pageEditor.event.target).html());
842842 $('#editor').html($(pageEditor.event.target).html());
843 $('#close-adv').button();
843 $("#adv-ref").button({icons:{primary:"ui-icon-script"},text:true}); $('#adv-ref').children().addClass('alipi');
844 $("#close-adv").button({icons:{primary:"ui-icon-bookmark"},text:true}); $('#close-adv').children().addClass('alipi');
845 // $('#close-adv').button();
844846 $('#close-adv').hide();
845847 $('#adv-ref').button();
846848
905905 $($('.ui-dialog-buttonset').children()[2]).attr('id','demag'); // '-'
906906 $($('.ui-dialog-buttonset').children()[3]).attr('id','add-link'); // 'Link'
907907 $($('.ui-dialog-buttonset').children()[4]).attr('id','save-changes'); // 'Save Changes'
908
909 $('#adv-reference').height($('#editor').height() + 40);
910 $('#reference').height($('#editor').height());
911 $('#mag').attr('title', 'To magnify letters/Increase font size');
912 $('#demag').attr('title', 'To demagnify letters/Decrease font size');
913 $('#add-link').attr('title', 'Add link(href) to the selected text portion (Before clicking this button, select some portion of text in "Editor")');
914 $('#save-changes').attr('title', 'Save edited text onto the page')
908915 },
909916
910917 showAdv: function() {