Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 36188c6

Browse files
author
mattpass
committed
Settings screen layout tweaks, change many selects to checkboxes, add tutorialOnLogin and tipsOnLogin
1 parent 105b073 commit 36188c6

File tree

1 file changed

+29
-53
lines changed

1 file changed

+29
-53
lines changed

lib/settings-screen.php

Lines changed: 29 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<script src="../assets/js/codemirror-compressed.js?microtime=<?php echo microtime(true);?>"></script>
1616

1717
<style type="text/css">
18-
.CodeMirror {position: absolute; width: 409px; height: 180px; font-size: <?php echo $ICEcoder["fontSize"];?>; transition: font-size 0.25s ease}
18+
.CodeMirror {position: absolute; width: 309px; height: 180px; font-size: <?php echo $ICEcoder["fontSize"];?>; transition: font-size 0.25s ease}
1919
.CodeMirror-scroll {overflow: hidden}
2020
/* Make sure this next one remains the 3rd item, updated with JS */
2121
.cm-tab {border-left-width: <?php echo $ICEcoder["visibleTabs"] ? "1px" : "0";?>; margin-left: <?php echo $ICEcoder["visibleTabs"] ? "-1px" : "0";?>; border-left-style: solid; border-left-color: rgba(255,255,255,0.2)}
@@ -190,7 +190,7 @@
190190

191191
<div id="styleSection" class="section" style="display: none">
192192

193-
<div style="display: inline-block; width: 400px; margin-right: 35px">
193+
<div style="display: inline-block; width: 300px; margin-right: 35px">
194194
<div style="height: 220px">
195195
<h2>preview</h2><br>
196196
<textarea id="code" name="code">
@@ -221,7 +221,7 @@ function find(start,history) {
221221
</div><div style="display: inline-block">
222222
<h2><?php echo $t['style'];?></h2><br>
223223
<?php echo $t['theme'];?><br>
224-
<select onchange="selectTheme();showButton()" id="select" name="theme" style="width: 95px">
224+
<select onchange="selectTheme();showButton()" id="select" name="theme" style="width: 145px">
225225
<option<?php if ($ICEcoder["theme"]=="default") {echo ' selected';}; ?>>default</option>
226226
<?php
227227
for ($i=0;$i<count($themeArray);$i++) {
@@ -232,7 +232,7 @@ function find(start,history) {
232232
</select>
233233
<br><br>
234234

235-
<div style="display: inline-block; width: 95px">
235+
<div style="display: inline-block; width: 145px">
236236
<?php echo $t['font size'];?><br>
237237
<input type="text" name="fontSize" id="fontSize" style="width: 44px" onkeydown="showButton()" onkeyup="changeFontSize()" value="<?php echo $ICEcoder["fontSize"];?>">
238238
</div><div style="display: inline-block">
@@ -241,40 +241,24 @@ function find(start,history) {
241241
</div>
242242
<br><br>
243243

244-
<div style="display: inline-block; width: 95px">
245-
<?php echo $t['match brackets'];?><br>
246-
<select onchange="showButton()" name="matchBrackets">
247-
<option value="true"<?php if($ICEcoder["matchBrackets"]) {echo " selected";};?>>yes</option>
248-
<option value="false"<?php if(!$ICEcoder["matchBrackets"]) {echo " selected";};?>>no</option>
249-
</select>
244+
<div style="display: inline-block; width: 145px">
245+
<input type="checkbox" onclick="showButton()" name="matchBrackets" value="true"<?php if($ICEcoder["matchBrackets"]) {echo ' checked';};?>> <?php echo $t['match brackets'];?><br>
250246
</div><div style="display: inline-block">
251-
<?php echo $t['show trailing space'];?><br>
252-
<select onchange="showButton()" name="showTrailingSpace">
253-
<option value="true"<?php if($ICEcoder["showTrailingSpace"]) {echo " selected";};?>>yes</option>
254-
<option value="false"<?php if(!$ICEcoder["showTrailingSpace"]) {echo " selected";};?>>no</option>
255-
</select>
247+
<input type="checkbox" onclick="showButton()" name="showTrailingSpace" value="true"<?php if($ICEcoder["showTrailingSpace"]) {echo ' checked';};?>> <?php echo $t['show trailing space'];?><br>
256248
</div>
257-
<br><br>
258-
259-
<input type="checkbox" onclick="showButton();showHideTabs()" name="visibleTabs" value="true"<?php if($ICEcoder["visibleTabs"]) {echo ' checked';};?>> <?php echo $t['visible tabs'];?>
260-
<br><br>
249+
<br>
261250

262-
<div style="display: inline-block; width: 95px">
263-
<?php echo $t['line wrapping'];?><br>
264-
<select onchange="showButton()" name="lineWrapping">
265-
<option value="true"<?php if($ICEcoder["lineWrapping"]) {echo " selected";};?>>yes</option>
266-
<option value="false"<?php if(!$ICEcoder["lineWrapping"]) {echo " selected";};?>>no</option>
267-
</select>
251+
<div style="display: inline-block; width: 145px">
252+
<input type="checkbox" onclick="showButton()" name="lineWrapping" value="true"<?php if($ICEcoder["lineWrapping"]) {echo ' checked';};?>> <?php echo $t['line wrapping'];?><br>
268253
</div><div style="display: inline-block">
269-
<?php echo $t['line numbers'];?><br>
270-
<select onchange="changeLineNumbersToggle();showButton()" name="lineNumbers" id="lineNumbers">
271-
<option value="true"<?php if($ICEcoder["lineNumbers"]) {echo " selected";};?>>yes</option>
272-
<option value="false"<?php if(!$ICEcoder["lineNumbers"]) {echo " selected";};?>>no</option>
273-
</select>
254+
<input type="checkbox" onclick="showButton()" name="lineNumbers" value="true"<?php if($ICEcoder["lineNumbers"]) {echo ' checked';};?>> <?php echo $t['line numbers'];?><br>
274255
</div>
275-
<br><br>
256+
<br>
276257

277-
<div style="display: inline-block; width: 95px">
258+
<input type="checkbox" onclick="showButton();showHideTabs()" name="visibleTabs" value="true"<?php if($ICEcoder["visibleTabs"]) {echo ' checked';};?>> <?php echo $t['visible tabs'];?>
259+
<br><br>
260+
261+
<div style="display: inline-block; width: 145px">
278262
<?php echo $t['scrollbars'];?><br>
279263
<select onchange="changescrollbarStyle(); showButton()" name="scrollbarStyle" id="scrollbarStyle">
280264
<option value="overlay"<?php if($ICEcoder["scrollbarStyle"] === "overlay") {echo " selected";};?>>overlay</option>
@@ -286,32 +270,18 @@ function find(start,history) {
286270

287271
<h2><?php echo $t['functionality'];?></h2><br>
288272

289-
<div style="display: inline-block; width: 95px">
273+
<div style="display: inline-block; width: 145px">
290274
<?php echo $t['indent type'];?><br>
291-
<select onchange="showButton()" name="indentWithTabs">
292-
<option value="true"<?php if($ICEcoder["indentWithTabs"]) {echo " selected";};?>>tabs</option>
293-
<option value="false"<?php if(!$ICEcoder["indentWithTabs"]) {echo " selected";};?>>spaces</option>
275+
<select onchange="showButton()" name="indentType">
276+
<option value="spaces"<?php if($ICEcoder["indentType"] === "spaces") {echo " selected";};?>>spaces</option>
277+
<option value="tabs"<?php if($ICEcoder["indentType"] === "tabs") {echo " selected";};?>>tabs</option>
294278
</select>
295279
<br><br>
296280

297-
<?php echo $t['auto indent'];?><br>
298-
<select onchange="showButton()" name="indentAuto">
299-
<option value="true"<?php if($ICEcoder["indentAuto"]) {echo " selected";};?>>yes</option>
300-
<option value="false"<?php if(!$ICEcoder["indentAuto"]) {echo " selected";};?>>no</option>
301-
</select>
302281
</div><div style="display: inline-block">
303-
<?php echo $t['auto close tags'];?><br>
304-
<select onchange="showButton()" name="autoCloseTags">
305-
<option value="true"<?php if($ICEcoder["autoCloseTags"]) {echo " selected";};?>>yes</option>
306-
<option value="false"<?php if(!$ICEcoder["autoCloseTags"]) {echo " selected";};?>>no</option>
307-
</select>
308-
<br><br>
309-
310-
<?php echo $t['auto close brackets'];?><br>
311-
<select onchange="showButton()" name="autoCloseBrackets">
312-
<option value="true"<?php if($ICEcoder["autoCloseBrackets"]) {echo " selected";};?>>yes</option>
313-
<option value="false"<?php if(!$ICEcoder["autoCloseBrackets"]) {echo " selected";};?>>no</option>
314-
</select>
282+
<input type="checkbox" onclick="showButton()" name="indentAuto" value="true"<?php if($ICEcoder["indentAuto"]) {echo ' checked';};?>> <?php echo $t['auto indent'];?><br>
283+
<input type="checkbox" onclick="showButton()" name="autoCloseTags" value="true"<?php if($ICEcoder["autoCloseTags"]) {echo ' checked';};?>> <?php echo $t['auto close tags'];?><br>
284+
<input type="checkbox" onclick="showButton()" name="autoCloseBrackets" value="true"<?php if($ICEcoder["autoCloseBrackets"]) {echo ' checked';};?>> <?php echo $t['auto close brackets'];?><br>
315285
</div>
316286
<br><br>
317287

@@ -340,6 +310,12 @@ function find(start,history) {
340310
}
341311
echo ' onclick="showButton()" id="enableRegistration"> '.$t['Registration'].' </input>';
342312
?>
313+
314+
<br><br>
315+
316+
<input type="checkbox" onclick="showButton()" name="tutorialOnLogin" value="true"<?php if($ICEcoder["tutorialOnLogin"]) {echo ' checked';};?>> Tutorial on Login<br><br>
317+
318+
<input type="checkbox" onclick="showButton()" name="tipsOnLogin" value="true"<?php if($ICEcoder["tipsOnLogin"]) {echo ' checked';};?>> Tips on Login (Coming soon)<br><br>
343319
</div>
344320

345321
<div id="securitySection" class="section" style="display: none">

0 commit comments

Comments
 (0)