Commit 99c6a91177841485337c549fd48ea5594137e124
- Diff rendering mode:
- inline
- side by side
server/stylesheet.css
(13 / 40)
  | |||
11 | 11 | color:#fff; | |
12 | 12 | } | |
13 | 13 | ||
14 | #msg-overlay { | ||
15 | height:25px; | ||
16 | width:100%; | ||
17 | position:fixed; | ||
18 | top:0%; | ||
19 | left:0%; | ||
20 | background-color:rgba(0, 0, 0, 0.4); | ||
21 | display:block; | ||
22 | text-align:center; | ||
23 | font-size:20px; | ||
24 | color:#fff; | ||
25 | } | ||
26 | |||
27 | #close-msg { | ||
14 | #close-button { | ||
15 | color:#FFF; | ||
16 | background: -moz-linear-gradient(center bottom, #000 0%, #FFF 100%); -webkit-linear-gradient(center bottom, #000 0%, #FFF 100%); | ||
17 | border: 1px solid #777; | ||
18 | border-radius: 3px; -moz-border-radius:10px; -webkit-border-radius:3px; | ||
28 | 19 | height:20px; | |
29 | 20 | margin-right:1px; | |
30 | -moz-border-radius:5px; | ||
31 | -webkit-border-radius:5px; | ||
32 | border:1px solid #2f6270; | ||
33 | 21 | text-align:center; | |
34 | 22 | width:50px; | |
35 | 23 | font-size:14px; | |
… | … | ||
54 | 54 | } | |
55 | 55 | ||
56 | 56 | #menu-button { | |
57 | border-radius:2px; | ||
58 | -moz-border-radius:2px; | ||
59 | -webkit-border-radius:2px; | ||
60 | border:5px solid #2f6270; | ||
57 | color:#FFF; | ||
58 | background: #222; | ||
59 | border:3px solid; | ||
60 | border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px; | ||
61 | 61 | text-align:center; | |
62 | 62 | font-size:14px; | |
63 | 63 | float:left; | |
… | … | ||
68 | 68 | } | |
69 | 69 | ||
70 | 70 | #edit-button { | |
71 | -moz-border-radius:5px; | ||
72 | -webkit-border-radius:5px; | ||
73 | border:1px solid #2f6270; | ||
71 | color:#FFF; | ||
72 | background: -moz-linear-gradient(center bottom, #000 0%, #FFF 100%); -webkit-linear-gradient(center bottom, #000 0%, #FFF 100%); | ||
73 | border: 1px solid #777; | ||
74 | border-radius: 3px; -moz-border-radius:10px; -webkit-border-radius:3px; | ||
74 | 75 | text-align:center; | |
75 | 76 | margin-top:10px; | |
76 | 77 | margin-left:20px; | |
… | … | ||
80 | 80 | font-size:20px; | |
81 | 81 | font-weight:bold; | |
82 | 82 | color:#fff; | |
83 | background-color:#2f6270; | ||
84 | } | ||
85 | |||
86 | #close-button { | ||
87 | -moz-border-radius:5px; | ||
88 | -webkit-border-radius:5px; | ||
89 | border:1px solid #2f6270; | ||
90 | text-align:center; | ||
91 | margin-top:10px; | ||
92 | margin-left:20px; | ||
93 | width:100px; | ||
94 | height:30px; | ||
95 | font-size:20px; | ||
96 | font-weight:bold; | ||
97 | color:#fff; | ||
98 | background-color:#2f6270; | ||
99 | 83 | } |
server/ui.js
(5 / 8)
  | |||
6 | 6 | flag : 0, | |
7 | 7 | testContext : function() | |
8 | 8 | { | |
9 | $(document).ready(function(){$('body *').contents().filter(function() {return (this.nodeType == 3) && this.nodeValue.match(/\S/);}).wrap('<span m4pageedittype=text/>')}); | ||
9 | $(document).ready(function(){$('body *').contents().filter(function() {return (this.nodeType == 3) && this.nodeValue.match(/\S/);}).wrap('<span m4pageedittype="text" oncopy="" onpaste=""/>')}); | ||
10 | 10 | vimg = document.getElementsByTagName('img'); | |
11 | 11 | for(i=0; i<vimg.length; i++) | |
12 | 12 | { | |
… | … | ||
19 | 19 | v[0].appendChild(a); | |
20 | 20 | var alltags = document.getElementsByTagName('*'); | |
21 | 21 | for (x=0; x<alltags.length; x++) { | |
22 | if(alltags[x].getAttribute("_moz_dirty")){ | ||
23 | alert("hello _moz_dirty"); | ||
24 | } | ||
22 | 25 | if (alltags[x].id == 'ren_overlay' || alltags[x].id == 'overlay1' ) { | |
23 | 26 | v[0].removeChild(document.getElementById('ren_overlay')); | |
24 | 27 | v[0].removeChild(document.getElementById('overlay1')); | |
… | … | ||
29 | 29 | } | |
30 | 30 | v[0].removeChild(document.getElementById('overlay2')); | |
31 | 31 | ||
32 | msg_overlay = document.createElement("div"); | ||
33 | v[0].appendChild(msg_overlay); | ||
34 | msg_overlay.setAttribute("id", "msg-overlay"); | ||
35 | msg_overlay.textContent = "Now your page is ready to edit... Enjoy editing !!"; | ||
36 | |||
37 | setTimeout("document.getElementById('msg-overlay').style.display='none'", 3000); | ||
38 | 32 | }, | |
39 | 33 | ||
40 | 34 | ||
… | … | ||
189 | 189 | dump( 'error: Document tree modified during iteration ' + e ); | |
190 | 190 | } | |
191 | 191 | }, | |
192 | close_msg: function() { | ||
192 | close: function() { | ||
193 | 193 | // var v = content.document.getElementsByTagName("body"); | |
194 | 194 | // v[0].removeChild(document.getElementById('ren_overlay')); | |
195 | 195 | document.getElementById('ren_overlay').style.display = 'none'; |
server/wsgi/page_edit.js
(2 / 0)
  | |||
1473 | 1473 | ||
1474 | 1474 | // Ajay - injecting edit-control to tag elements | |
1475 | 1475 | editAttributes = new DOM.Attributes({ 'm4pageeditcontrol': true }); | |
1476 | //editAttributes.designMode = 'on'; | ||
1477 | //editAttributes.html="0"; | ||
1476 | 1478 | elementAttributes = editAttributes.addStyle('margin:0; padding:0; border:none; text-indent: 0px; background: none;'); | |
1477 | 1479 | fontTypeAttributes = elementAttributes.addStyle("font-family: Helvetica Neue, Helvetica, Arial, Sans-serif;"); | |
1478 | 1480 | normalFontAttributes = fontTypeAttributes.addStyle("font-weight:bold; font-size:12px; line-height: 10px;"); |