Commit 5dfb196caa863fbc0098bb4222ee1fbfc0e9c2ea
- Diff rendering mode:
- inline
- side by side
server/alipi.py
(20 / 5)
  | |||
127 | 127 | g.root.body.append(style_cust) | |
128 | 128 | ||
129 | 129 | def 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') | ||
131 | 147 | g.root.body.append(see_orig) | |
132 | 148 | see_orig.set("id", "orig-button") | |
133 | 149 | see_orig.set("class", "alipi") | |
134 | see_orig.set("type", "submit") | ||
135 | 150 | 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 | |||
139 | 154 | tweetroot = g.root.makeelement("div") | |
140 | 155 | tweetroot.set("id", "tweet-root") | |
141 | 156 | tweetroot.set("class", "alipi") |
server/stylesheet.css
(25 / 26)
  | |||
1 | 1 | @media screen and (min-width:1000px) { | |
2 | 2 | ||
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; } | ||
4 | 4 | ||
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 | |||
8 | 5 | #edit-current { font-size:17px; font-weight:400; font-style:italic; text-align:justify; display:none; } | |
9 | 6 | #see-narration { font-size:17px; font-weight:400; font-style:italic; text-align:justify; display:none; } | |
10 | 7 | #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 | |||
20 | 19 | #share { font-size:17px; font-weight:400; font-style:italic; text-align:justify; display:none; } | |
21 | 20 | #orig-button { font-size:17px; font-weight:400; font-style:italic; text-align:justify; display:none; } | |
22 | 21 | #info { font-size:17px; font-weight:400; font-style:italic; text-align:justify; display:none; } | |
… | … | ||
45 | 45 | #editoroverlay { min-width:90%; text-align:justify; display: none; } | |
46 | 46 | #editoroverlay a { color:#1C94C4; } | |
47 | 47 | ||
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; | ||
49 | 49 | font-weight:400; font-style:normal; color:#aaa; overflow:show; background:none; text-align:justify; display:none; } | |
50 | 50 | ||
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; | ||
52 | 52 | font-weight:400; font-style:normal; text-align:justify; color:#aaa; overflow:show; background:none; text-align:justify; } | |
53 | 53 | ||
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; | ||
55 | 55 | font-weight:400; font-style:normal; text-align:justify; color:#000; background-color:#ffe; text-align:justify; } | |
56 | 56 | ||
57 | 57 | #ref-lab { position:absolute; top:5%; font-size:17px; font-weight:400; font-style:italic; color:#aaa; text-align:justify; } | |
… | … | ||
107 | 107 | #edit-current { font-size:14px; font-weight:200; font-style:italic; text-align:justify; display:none; } | |
108 | 108 | #see-narration { font-size:14px; font-weight:200; font-style:italic; text-align:justify; display:none; } | |
109 | 109 | #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; | ||
111 | 114 | border-bottom-left-radius:0px; -moz-border-radius-topleft:0px; -webkit-border-top-left-radius:0px; -khtml-border-top-left-radius:0px; | |
112 | 115 | 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 | } | ||
119 | 119 | #share { font-size:14px; font-weight:200; font-style:italic; text-align:justify; display:none; } | |
120 | 120 | #orig-button { font-size:14px; font-weight:200; font-style:italic; text-align:justify; display:none; } | |
121 | 121 | #info { font-size:14px; font-weight:200; font-style:italic; text-align:justify; display:none; } | |
… | … | ||
148 | 148 | #editoroverlay { min-width:90%; display: none; } | |
149 | 149 | #editoroverlay a { color:#1C94C4; } | |
150 | 150 | ||
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; | ||
152 | 152 | 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; | ||
154 | 154 | text-align:justify; color:#aaa; font-weight:normal; overflow:show; background:none; } | |
155 | 155 | ||
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; | ||
157 | 157 | background-color:#ffe; font-size:14px; font-weight:200; font-style:normal; text-align:justify; } | |
158 | 158 | ||
159 | 159 | #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)
  | |||
151 | 151 | value = pair[1]; | |
152 | 152 | d[key] = value; | |
153 | 153 | } | |
154 | $('#infoDiv').append(d['xpath']); | ||
155 | $('#infoDiv').append('<br>'); | ||
156 | 154 | path = d['xpath']; | |
157 | 155 | newContent = d['data']; | |
158 | 156 | elementType = d['elementtype']; | |
… | … | ||
334 | 334 | var overlay_template = '<div id="renarrated_overlay" class="alipi ui-widget-header ui-corner-all">'+ | |
335 | 335 | '<button id="outter-down-button" class="alipi" onclick="a11ypi.outterToggle();" up="true" title="Move this bar to top">Move</button> '+ | |
336 | 336 | '<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> '+ | ||
338 | 338 | '<button id="see-narration" class="alipi" onclick="a11ypi.showBox();" title="See other renarrations, which are in same or other languages"> '+ | |
339 | 339 | 'Re-narrations</button>'+ | |
340 | 340 | '<button id="see-links" class="alipi" onclick="a11ypi.showBox1();" title="See other re-narrated pages of this domain">Re-narrated Pages '+ | |
341 | 341 | '</button>'+ | |
342 | 342 | '<select id="blog-filter" class="alipi" onChange="a11ypi.checkSelect();" title="Select one of the blog name"></select>'+ | |
343 | 343 | '<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>'+ | ||
348 | 344 | '<div id="show-box" title="Choose a narration"></div> '+ | |
349 | 345 | '<div id="show-links" title="List of pages narrated in this domain" class="alipi"></div> '+ | |
350 | 346 | '<div id="share-box" class="alipi" title="Share this page in any following social network"></div>'; | |
… | … | ||
348 | 348 | var pub_overlay_template = '<div id="pub_overlay" class="alipi ui-widget-header ui-corner-all">'+ | |
349 | 349 | '<button id="icon-up" class="alipi" down="true" onClick="a11ypi.hide_overlays();" title="Move this bar to top">Move</button>'+ //▲ | |
350 | 350 | '<button id="icon-down" class="alipi" onClick="a11ypi.hide_overlays();" title="Move this bar to bottom">Move</button>'+ //▼ | |
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>'+ | ||
354 | 355 | '<button id="publish-button" class="alipi" onclick="a11ypi.publish();"title="Publish your changes to blog">Publish</button></div>'; | |
355 | 356 | ||
356 | 357 | 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>'+ | ||
361 | 362 | '<button id="replace-image" class="alipi" onclick="a11ypi.imageReplacer();" title="Allow you to give an image file(jpeg/jpg/gif/png) '+ | |
362 | 363 | 'link to replace with this image">Replace Image</button>'+ | |
363 | 364 | '<button id="delete-image" class="alipi" onclick="pageEditor.deleteImage();" title="Remove this image from page">Delete Image</button>'+ | |
364 | 365 | '<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> '+ | ||
366 | 367 | '</div>'; | |
367 | 368 | ||
368 | 369 | $('body').append(overlay_template); | |
… | … | ||
416 | 416 | } else { | |
417 | 417 | } | |
418 | 418 | ||
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')); | ||
424 | 424 | } | |
425 | 425 | }, | |
426 | 426 | checkSelect: function() | |
… | … | ||
818 | 818 | ||
819 | 819 | displayEditor: function() { | |
820 | 820 | 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>'+ | ||
824 | 825 | '<div id="reference" class="alipi" readonly="yes"></div>'+ | |
825 | 826 | '<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>'+ | ||
827 | 828 | '<div id="editor" class="alipi" contenteditable="true" '+ // onkeyup="a11ypi.reflectInReference();"> | |
828 | 829 | // '<div id="forPrevData" class="alipi"></div>'+ | |
829 | 830 | '</div>'; | |
… | … | ||
840 | 840 | $('#adv-reference').text('<'+tag+'>'+$(pageEditor.event.target).html()+'</'+tag+'>'); | |
841 | 841 | $('#reference').html($(pageEditor.event.target).html()); | |
842 | 842 | $('#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(); | ||
844 | 846 | $('#close-adv').hide(); | |
845 | 847 | $('#adv-ref').button(); | |
846 | 848 | ||
… | … | ||
905 | 905 | $($('.ui-dialog-buttonset').children()[2]).attr('id','demag'); // '-' | |
906 | 906 | $($('.ui-dialog-buttonset').children()[3]).attr('id','add-link'); // 'Link' | |
907 | 907 | $($('.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') | ||
908 | 915 | }, | |
909 | 916 | ||
910 | 917 | showAdv: function() { |