|
44 | 44 | }
|
45 | 45 | $fp_uuid = Configure::read('filePickerId');
|
46 | 46 |
|
47 |
| - |
| 47 | + |
48 | 48 | if( ! isset($script) ) $script = $this->webroot . 'admin/filePicker';
|
49 | 49 | if( ! isset($width) ) $width = 400;
|
50 | 50 | if( ! isset($height) ) $height = 400;
|
51 | 51 | if( ! isset($fileFilter) ) $fileFilter = '';
|
52 | 52 | if( ! isset($fileFilterErrorMsg) ) $fileFilterErrorMsg = 'Incorrect file type';
|
53 | 53 | if( ! isset($destSelector) ) $destSelector = 'body>XX'; // default selector return 0 elements
|
54 | 54 | if( ! isset($msg) ) $msg = '';
|
55 |
| - |
| 55 | + |
56 | 56 | // Find root:
|
57 | 57 | /*if( strpos( strtolower(PHP_OS), 'win') !== false )
|
58 | 58 | {
|
|
63 | 63 | $root = '/';
|
64 | 64 | }*/
|
65 | 65 | $root = '';
|
66 |
| - |
| 66 | + |
67 | 67 | ?>
|
68 | 68 |
|
69 | 69 | <!-- FILE PICKER -->
|
70 | 70 | <link rel="stylesheet" type="text/css" href="<?php echo $this->webroot?>css/jqueryFileTree.css" media="screen" />
|
71 | 71 | <style>
|
72 | 72 | .fp-container {
|
73 | 73 | }
|
74 |
| - |
| 74 | + |
75 | 75 | /* The fp-XXX-pannel is the div that gets lighted */
|
76 | 76 | #fp-<?php echo $fp_uuid?>-panel {
|
77 |
| - display:none; |
| 77 | + display:none; |
78 | 78 | position:fixed;
|
79 |
| - top:100px; |
80 |
| - left:50%; |
81 |
| - margin-left:-200px; |
82 |
| - width:<?php echo $width?>px; |
83 |
| - background:#FFFFFF; |
84 |
| - padding:10px 15px 10px 15px; |
85 |
| - border:2px solid #CCCCCC; |
| 79 | + top:100px; |
| 80 | + left:50%; |
| 81 | + margin-left:-200px; |
| 82 | + width:<?php echo $width?>px; |
| 83 | + background:#FFFFFF; |
| 84 | + padding:10px 15px 10px 15px; |
| 85 | + border:2px solid #CCCCCC; |
86 | 86 | z-index:1001;
|
87 | 87 | }
|
88 |
| - |
| 88 | + |
89 | 89 | /* The fp-XXX-pannel is the div that covers the rest of the page */
|
90 |
| -#fp-<?php echo $fp_uuid?>-background { |
91 |
| - display:none; |
92 |
| - background:#000000; |
93 |
| - opacity:0.5; |
94 |
| - filter:alpha(opacity=90); |
95 |
| - position:absolute; |
96 |
| - top:0px; |
97 |
| - left:0px; |
98 |
| - min-width:100%; |
99 |
| - min-height:100%; |
100 |
| - z-index:1000; |
| 90 | +#fp-<?php echo $fp_uuid?>-background { |
| 91 | + display:none; |
| 92 | + background:#000000; |
| 93 | + opacity:0.5; |
| 94 | + filter:alpha(opacity=90); |
| 95 | + position:absolute; |
| 96 | + top:0px; |
| 97 | + left:0px; |
| 98 | + min-width:100%; |
| 99 | + min-height:100%; |
| 100 | + z-index:1000; |
101 | 101 | }
|
102 |
| - |
| 102 | + |
103 | 103 | .fp-fileTree {
|
104 | 104 | width: <?php echo $width?>px;
|
105 | 105 | height: 300px;
|
|
112 | 112 | padding: 5px;
|
113 | 113 | text-align: left;
|
114 | 114 | }
|
115 |
| - |
| 115 | + |
116 | 116 | .fp-inputFile {
|
117 | 117 | position: relative;
|
118 | 118 | width: <?php echo $width+5?>px;
|
119 | 119 | }
|
120 |
| - |
| 120 | + |
121 | 121 | .fp-inputButton {
|
122 | 122 | position: relative;
|
123 | 123 | float: left;
|
124 | 124 | display: block;
|
125 | 125 | width: 100px;
|
126 | 126 | margin: 3px 40px;
|
127 | 127 | }
|
128 |
| - |
| 128 | + |
129 | 129 | .fp-open {
|
130 |
| - } |
| 130 | + } |
131 | 131 | </style>
|
132 | 132 |
|
133 | 133 | <?php if($fp_uuid == 1) {?>
|
@@ -179,15 +179,15 @@ $(document).ready( function() {
|
179 | 179 | }
|
180 | 180 | return false; // important to return false to prevent a form that include
|
181 | 181 | // this element to be submitted when the user just want to
|
182 |
| - // select a file. |
| 182 | + // select a file. |
183 | 183 | });
|
184 | 184 |
|
185 | 185 | //$("#fp-<?php echo $fp_uuid?>-panel").draggable();
|
186 | 186 | });
|
187 | 187 | </script>
|
188 | 188 | <input type="submit" id="fp-<?php echo $fp_uuid?>-open" class="fp-open" value="Choose"></input>
|
189 | 189 | <div id="fp-<?php echo $fp_uuid?>-container" class="fp-container">
|
190 |
| - |
| 190 | + |
191 | 191 | <div id="fp-<?php echo $fp_uuid?>-background"></div>
|
192 | 192 | <div id="fp-<?php echo $fp_uuid?>-panel">
|
193 | 193 | <b><?php echo $msg; ?></b>
|
|
0 commit comments