OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta charset=utf-8> | 4 <meta charset=utf-8> |
5 <title>Color Suggestion Picker test</title> | 5 <title>Color Suggestion Picker test</title> |
6 <style> | 6 <style> |
7 body { | 7 body { |
8 background-color: #eeffff; | 8 background-color: #eeffff; |
9 } | 9 } |
10 iframe { | 10 iframe { |
(...skipping 20 matching lines...) Expand all Loading... |
31 values : ['#000000', '#404040', '#808080', '#c0c0c0', '#ffffff', '#980000',
'#ff0000', '#ff9900', '#ffff00', '#00ff00', '#00ffff', '#4a86e8', '#0000ff', '#9
900ff', '#ff00ff', '#404040', '#808080', '#c0c0c0', '#ffffff', '#980000', '#ff00
00', '#ff9900', '#ffff00', '#00ff00', '#00ffff', '#4a86e8', '#0000ff', '#9900ff'
, '#ff00ff'], | 31 values : ['#000000', '#404040', '#808080', '#c0c0c0', '#ffffff', '#980000',
'#ff0000', '#ff9900', '#ffff00', '#00ff00', '#00ffff', '#4a86e8', '#0000ff', '#9
900ff', '#ff00ff', '#404040', '#808080', '#c0c0c0', '#ffffff', '#980000', '#ff00
00', '#ff9900', '#ffff00', '#00ff00', '#00ffff', '#4a86e8', '#0000ff', '#9900ff'
, '#ff00ff'], |
32 otherColorLabel: 'Other...' | 32 otherColorLabel: 'Other...' |
33 }; | 33 }; |
34 | 34 |
35 function openColorPicker(args) { | 35 function openColorPicker(args) { |
36 var frame = document.getElementsByTagName('iframe')[0]; | 36 var frame = document.getElementsByTagName('iframe')[0]; |
37 var doc = frame.contentDocument; | 37 var doc = frame.contentDocument; |
38 doc.documentElement.innerHTML = '<head></head><body><div id=main>Loading...<
/div></body>'; | 38 doc.documentElement.innerHTML = '<head></head><body><div id=main>Loading...<
/div></body>'; |
39 var commonCssLink = doc.createElement('link'); | 39 var commonCssLink = doc.createElement('link'); |
40 commonCssLink.rel = 'stylesheet'; | 40 commonCssLink.rel = 'stylesheet'; |
41 commonCssLink.href = '../../Source/WebCore/Resources/pagepopups/pickerCommon
.css?' + (new Date()).getTime(); | 41 commonCssLink.href = '../../Source/web/resources/pickerCommon.css?' + (new D
ate()).getTime(); |
42 doc.head.appendChild(commonCssLink); | 42 doc.head.appendChild(commonCssLink); |
43 var link = doc.createElement('link'); | 43 var link = doc.createElement('link'); |
44 link.rel = 'stylesheet'; | 44 link.rel = 'stylesheet'; |
45 link.href = '../../Source/WebCore/Resources/pagepopups/colorSuggestionPicker
.css?' + (new Date()).getTime(); | 45 link.href = '../../Source/web/resources/colorSuggestionPicker.css?' + (new D
ate()).getTime(); |
46 doc.head.appendChild(link); | 46 doc.head.appendChild(link); |
47 var commonJsScript = doc.createElement('script'); | 47 var commonJsScript = doc.createElement('script'); |
48 commonJsScript.src = '../../Source/WebCore/Resources/pagepopups/pickerCommon
.js?' + (new Date()).getTime(); | 48 commonJsScript.src = '../../Source/web/resources/pickerCommon.js?' + (new Da
te()).getTime(); |
49 doc.body.appendChild(commonJsScript); | 49 doc.body.appendChild(commonJsScript); |
50 var script = doc.createElement('script'); | 50 var script = doc.createElement('script'); |
51 script.src = '../../Source/WebCore/Resources/pagepopups/colorSuggestionPicke
r.js?' + (new Date()).getTime(); | 51 script.src = '../../Source/web/resources/colorSuggestionPicker.js?' + (new D
ate()).getTime(); |
52 doc.body.appendChild(script); | 52 doc.body.appendChild(script); |
53 | 53 |
54 var pagePopupController = { | 54 var pagePopupController = { |
55 setValueAndClosePopup: function(numValue, stringValue) { | 55 setValueAndClosePopup: function(numValue, stringValue) { |
56 window.log('number=' + numValue + ', string="' + stringValue + '"'); | 56 window.log('number=' + numValue + ', string="' + stringValue + '"'); |
57 if (numValue === 0) | 57 if (numValue === 0) |
58 window.document.getElementById('color').value = stringValue; | 58 window.document.getElementById('color').value = stringValue; |
59 }, | 59 }, |
60 setValue: function(value) { | 60 setValue: function(value) { |
61 window.log('value="' + value + '"'); | 61 window.log('value="' + value + '"'); |
(...skipping 12 matching lines...) Expand all Loading... |
74 function log(str) { | 74 function log(str) { |
75 var entry = document.createElement('li'); | 75 var entry = document.createElement('li'); |
76 entry.innerText = str; | 76 entry.innerText = str; |
77 document.getElementById('console').appendChild(entry); | 77 document.getElementById('console').appendChild(entry); |
78 } | 78 } |
79 | 79 |
80 openColorPicker(arguments); | 80 openColorPicker(arguments); |
81 </script> | 81 </script> |
82 </body> | 82 </body> |
83 </html> | 83 </html> |
OLD | NEW |