1 CKEDITOR.dialog.add("googledocs", function(a) {
3 title: a.lang.googledocs.title,
11 label: a.lang.googledocs.settingsTab,
15 className: "googledocs",
16 label: a.lang.googledocs.selectDocument,
20 onChange: function() {
21 CKEDITOR.dialog.getCurrent().getContentElement("settingsTab", "txtUrl").setValue(this.getValue())
26 label: a.lang.googledocs.url,
28 validate: CKEDITOR.dialog.validate.notEmpty(a.lang.googledocs.alertUrl)
31 widths: ["60px", "330px"],
32 className: "googledocs",
37 label: a.lang.common.width,
40 validate: CKEDITOR.dialog.validate.integer(a.lang.googledocs.alertWidth)
45 label: a.lang.common.height,
48 validate: CKEDITOR.dialog.validate.integer(a.lang.googledocs.alertHeight)
53 label: a.lang.googledocs.uploadTab,
54 filebrowser: "uploadButton",
61 label: a.lang.googledocs.btnUpload,
63 action: "QuickUpload",
64 onSelect: function(a) {
68 "for": ["uploadTab", "upload"]
72 var b = a.document.createElement("iframe"),
73 c = encodeURIComponent(this.getValueOf("settingsTab", "txtUrl"));
74 b.setAttribute("src", "http://docs.google.com/viewer?url=" + c + "&embedded=true");
75 b.setAttribute("width", this.getValueOf("settingsTab",
77 b.setAttribute("height", this.getValueOf("settingsTab", "txtHeight"));
78 b.setAttribute("style", "border: none;");
86 var getDocuments = function(a) {
87 CKEDITOR.env.ie7Compat && fixIE7display();
88 $.get(CKEDITOR.currentInstance.config.filebrowserGoogledocsBrowseUrl, function(b) {
89 var c = CKEDITOR.dialog.getCurrent().getContentElement("settingsTab", "documents");
91 $.each(b, function(a, b) {