1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
3 | <head> |
---|
4 | <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> |
---|
5 | <title>Insert Block</title> |
---|
6 | <meta name="robots" content="noindex, nofollow" /> |
---|
7 | <style type="text/css"> |
---|
8 | input.textbox{width: 100%;} |
---|
9 | </style> |
---|
10 | <!--[if IE]> |
---|
11 | <style type="text/css"> |
---|
12 | input.textbox{width: 300px;} |
---|
13 | </style> |
---|
14 | <![endif]--> |
---|
15 | |
---|
16 | <link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/mw_lib/fsm/jqueryFileTree/jqueryFileTree.css" /> |
---|
17 | <script type="text/javascript" src="/misc/jquery.js"></script> |
---|
18 | <script type="text/javascript" src="/sites/all/modules/mw_lib/fsm/jqueryFileTree/jqueryFileTree.js"></script> |
---|
19 | <script type="text/javascript" src="/sites/all/modules/mw_lib/fsm/fsm.js.php"></script> |
---|
20 | <script type="text/javascript" src="../../fckeditor/editor/dialog/common/fck_dialog_common.js"></script> |
---|
21 | <script type="text/javascript"> |
---|
22 | |
---|
23 | function fill_in_url(file) |
---|
24 | { |
---|
25 | GetE('txtLink').value = "{drupal:module_invoke:mw_blocks|build_block|"+file+"}"; |
---|
26 | } |
---|
27 | var dialog = window.parent; |
---|
28 | var oEditor = dialog.InnerDialogLoaded(); |
---|
29 | var FCK = oEditor.FCK; |
---|
30 | var FCKLang = oEditor.FCKLang; |
---|
31 | var olink = dialog.Selection.GetSelection().MoveToAncestorNode('img'); |
---|
32 | |
---|
33 | window.onload = function() |
---|
34 | { |
---|
35 | oEditor.FCKLanguageManager.TranslatePage(document); |
---|
36 | if(olink) |
---|
37 | { |
---|
38 | FCK.Selection.SelectNode(olink); |
---|
39 | GetE('txtLink').value = olink.alt; |
---|
40 | } |
---|
41 | |
---|
42 | $('#fsmPageBrowser').fileTree( |
---|
43 | { |
---|
44 | root: '', |
---|
45 | script: '/admin/fsm/block_tree/1', |
---|
46 | multiFolder: false, |
---|
47 | folderEvent: 'dblclick' |
---|
48 | }, |
---|
49 | function(file) { |
---|
50 | fill_in_url(file); |
---|
51 | } |
---|
52 | ); |
---|
53 | window.parent.SetAutoSize(true); |
---|
54 | window.parent.SetOkButton(true); |
---|
55 | } |
---|
56 | |
---|
57 | function Ok() |
---|
58 | { |
---|
59 | var txtLink = GetE('txtLink').value; |
---|
60 | |
---|
61 | if(txtLink.length == 0) |
---|
62 | { |
---|
63 | alert(FCKLang.fsmNoCode); |
---|
64 | return false; |
---|
65 | } |
---|
66 | |
---|
67 | oEditor.FCKUndo.SaveUndoStep(); |
---|
68 | |
---|
69 | sValue = FCK.InsertElement('img'); |
---|
70 | sValue.src = '/admin/fsm/load_icon/block'; |
---|
71 | sValue.alt = txtLink; |
---|
72 | return true; |
---|
73 | } |
---|
74 | |
---|
75 | </script> |
---|
76 | </head> |
---|
77 | |
---|
78 | <body> |
---|
79 | <div id="fsmPageBrowser" style="padding-bottom: 10px"> |
---|
80 | |
---|
81 | </div> |
---|
82 | <span fckLang="fsmBlockLinkName">code to insert</span><br /> |
---|
83 | <input id="txtLink" class="textbox" type="text" disabled="disabled" /> |
---|
84 | </body> |
---|
85 | </html> |
---|