165 Commits

Author SHA1 Message Date
Matt Pass
046bec29b2 Update function added
Shows confirm message and then either auto updates or opens ICEcoder
depending on user clicking OK or Cancel button
2013-08-30 08:35:59 +01:00
Matt Pass
8df54367c5 2 new themes are light, need grey current line
3024-day and base16-light
2013-08-11 17:18:53 +01:00
Matt Pass
fd2197eace SQL mode added
Chose MySQL as the default dialect, others possible so added a comment
on that
2013-08-11 17:07:50 +01:00
Matt Pass
c592e704ba Minor tweaks only re tag wrappers
No need to hardcode setting in the main ICEcoder object
Moved function param for tagWrapperCommand placement
Minor syntax tweaks for consistency
Also removed now old comment
2013-08-11 16:04:25 +01:00
pushreset
65c77f7d93 Choose tag wrapper combination 2013-08-10 18:22:55 +02:00
Matt Pass
e715d02ea1 Can now move multiple lines up/down
Also added comments to help with understanding
2013-08-09 09:06:31 +01:00
Matt Pass
e5fac3efa3 XML added as a filetype & nest indicator fixes
Nest indicator now works with XML too
Set cx as false and then set if we have a matching object structure
Do nest indicator even if we don't have a html or body tag, as we may
have XML
Always show 'content' after the nest tags, except if it's JavaScript
2013-08-09 07:35:44 +01:00
Matt Pass
ce62da5b5c Populate new results bar. plus tweak & bug fix
lineCount and charCount are var's no longer used, removed
Add scrollBarVisible var, is true or false depending on if we have a
scrollbar
Removed numChars and charsToCursor vars as we're now using
cM.indexFromPos which gives the same result, but using CodeMirror so
probably more efficient
A new ICEcoder.resultsLines array is now available, populated with
unique line numbers of found results
4 other new vars added for new functionality and also filesQS which I'd
missed adding before
New functionality to create colored blocks and add into the container,
at heights determined by the amount of content and colored according to
which line we're on
Else clause added to clear results and this container if we have a blank
find string
2013-08-07 18:47:21 +01:00
Matt Pass
28e71adaf5 Reduce heading tag wrappers down to h1-h3
This is because AltGr+4 is used by { on French keyboards, it's a $ on
Turkish keyboards etc
Many people won't go beyond h3 anyway and so it's best to have h1-h3 and
have AltGr+4 working as expected for non English keyboards
2013-08-05 16:28:29 +01:00
Matt Pass
28c59f88e9 No line param on function and tweaked comment 2013-07-25 07:59:26 +01:00
Matt Pass
90a531d2a8 focus method added and only actions if not iThing
CodeMirror focus method was causing no keyboard issues on
iPad/iPhone/iPod
All focus() calls nowrunning through new focus method, which acts as a
single point to do this
Will not do this if iPhone|iPad|iPod test is true
2013-07-25 07:17:09 +01:00
Matt Pass
1f1c71b218 cmdKey flag setup & usage
Also slightly taller help screen as Ctrl+space shortcut is added
Also resetKeys on open webpage or get info window
2013-07-24 08:27:16 +01:00
Matt Pass
d2cb97ab0a Comments added and a couple of fixes
Condensed code on checking if find or replace are the active elements
Fix to remainder string used by function snippet, needed 1 char more
2013-07-22 09:05:06 +01:00
Matt Pass
aaa10a5fff File menu won't get cut off & minor syntax tweaks
Remove unused vars & whitespace
File manager menu won't get cut off if we trigger it near bottom of
screen. Now works out height of it and takes that into account so the
bottom sits 5px from the window.innerHeight bottom
Redo working out chPos in a more logical way
Tidy up formatting etc and add comments
Only run file.replace once, set in var
2013-07-21 18:51:13 +01:00
Matt Pass
673c779ca5 Condense, improve, reduce & fix find/replace
Only action replace on buttonClick (same as replace all), as having a
result selected and changing replace value can replace selection without
a button click, which is undesirable
if condition was wrong, should be based on if we already have that char
ref point in ICEcoder.results
Remove old code re counting no of chars previous to cursors line, and
other old chunks of code that seem to do nothing
Use a much shorter and more efficient way to count chars to our cursor
now
Same for building up filesQS, just join the array values with a colon
2013-07-18 18:04:45 +01:00
Matt Pass
8c74c7a77c autoOpenFiles if fmReady
New fmReady var, set to true when the file manager is ready
An interval is set up and auto opens files as soon as this var changes
Simplifying for loop
2013-07-18 06:50:07 +01:00
Matt Pass
d3d5554969 Lots of minor tweaks and code condensing
Text and comment improvements and additions in many places
Can now just use window.innerWidth/height, no need for ternary condition
Simplifying an if and ternary condition
contentCleanUp should happen on all files
Put the line swapping into 1 operation so an undo makes sense
Replace document.getElementById() with top.get() in many places
Add/remove vars to avoid global leaks/clear away old vars
Use break instead of escaping through var setting
Add != "/[NEW}" to if condition so we can open multiple new files
Remove old code re switch tabs to open file, this is handled by isOpen
if condition now
Condensing a lot of code on deleteFiles function
Condensed code a little on showMenu function re folderMenuItems
2013-07-16 17:41:12 +01:00
Matt Pass
8601363d46 Don't focus if we press space in replace field 2013-07-11 07:41:31 +01:00
Matt Pass
934d353537 codeAssist set from settings, fixes to updating
codeAssist is now set along with other settings in index.php
solarized and xq-light should have lighter active lines too
If codeAssist isn't the same as out session setting, set it to the
updated setting and toggle the switch
Adjusts to CSS stylesheet targeting. New CSS file meant it's now
position 4 in the array and child item 4 where we'll find the content
style
I also changed background to background-color on the activeLine style
2013-07-10 17:29:58 +01:00
Matt Pass
c2ce4bed8f Help screen 50px less, only focus if not in find
Also only focus if we have an open file
2013-07-07 15:42:36 +01:00
Matt Pass
4a8703d5f0 duplicate Lines and removeLines enhancements
Both functions can now duplicate and remove multiple lines as well as
specified line or current line
Tries to handle duplicating intelligently with line breaks if selection
ends at a line end getting a line break
2013-07-06 18:09:10 +01:00
Matt Pass
332f2a492d Wrap & unwrap with same shortcut
Will now unwrap selection with same shortcut
Works for all tag wrapper shortcuts except for div and span where you
may want to nest
2013-07-06 17:14:14 +01:00
Matt Pass
51aa38764a Apply the linting to all JS files
Cycle thru all open files, and if it's a JS file, apply or remove the
linting option
2013-06-30 11:54:31 +01:00
Matt Pass
8a24eeff24 Remove old lint system, layout adjust for gutter
Remove updateHints function, upgraded to new gutter based JS Hint system
On toggle of codeAssist, clear the gutter and set lintWith to false if
we're turning off
1st tab position is now an extra 12px, so 53px not 41px
2013-06-30 11:45:39 +01:00
Matt Pass
68a8d6e052 Close folder contents before hiding
This will openClose a folder without requesting a reload. This means if
it's a closed folder it will stay closed and if it's an open folders it
will get closed. This is done before hiding the folder, without this the
child contents will still be seen even though the parent folder display
itself is hidden.
Function is now named deleteFiles
2013-06-29 23:32:50 +01:00
Matt Pass
f9b008f7d2 Natural comparisons and duplicate file function
Comparisons on files such as xyz9.txt and xyz10.txt would come out as
xyz9.txt being higher and cause issues as startFile and endFile would be
the wrong way round. I'm therefore now comparing on regex replaced
values, where numbers may be prefixed by up to 20 zeros (note
substr(-20) to right align our value.
delete, copy and paste file functions now plural as they handle multiple
files.
copyFiles works with a given fileList and not just the selectedFiles
array. Also passing params to control if we hide or show paste option
and file menu
pasteFiles will refuse to paste the root, that would cause bad looping &
compound pasting issues
duplicateFiles function added which takes a snapshot of the copiedFiles
array, copies the files while not showing paste menu or hiding menu. It
then sets the paste location to be the parent of the duplicate target
and pastes into that location. Once done copiedFiles is returned to the
snapshot image.
2013-06-29 22:20:18 +01:00
Matt Pass
52fc11eb57 Open files from list function added
Will open files from array of paths
2013-06-29 17:46:25 +01:00
Matt Pass
c0e62ad8e8 Remove line class based on CM not tab no 2013-06-29 15:45:13 +01:00
Matt Pass
cd38113da2 Fix to save path containing filenames
Detect a . in the filePath and if we find one, save at root instead
(Stops us saving at a path that's actually a file, eg |TEST|file.txt)
2013-06-28 22:56:13 +01:00
Matt Pass
ba14dfdc46 Taller help screen to accomodate new shortcuts 2013-06-21 21:49:50 +01:00
Matt Pass
bc8903d3c8 If we haven't specified, close the current tab 2013-06-21 21:27:11 +01:00
Matt Pass
df81050c2a H7 removed, H1-H6 now only
H7 removed as not officially part of the W3C spec
2013-06-21 20:57:17 +01:00
Matt Pass
ebfafc66cb Show light or dark text on picker previews
Declare all vars at the top of function
If the R, G or B values have less than 50% saturation or we have a high
yellow like color, use a white text color, otherwise black
Set that on both the X&Y preview and the clicked color preview
2013-06-21 20:53:00 +01:00
Matt Pass
13e1b933e1 Only action on fileName and dontAsk param
We can only set the CaretLocType if we have a fileName to inspect, an
edge case brought up by unit testing
Extra param added to closeTab to allow us to not ask the user for close
permission on unsaved files
2013-06-10 09:49:54 +01:00
Matt Pass
8db478d8f0 New color settings added, BG image removed
tabBGopen now a lighter color, plus tabFGcurrent and tabFGopenFile
colors added
Removed bgVPos and no longer setting BG position as we're not using an
image anymore
(Instead we set either the current or open tabBG color
We also set the FG color of the filename to current or openFile
2013-06-05 18:11:54 +01:00
Matt Pass
eaf39661ba Fade menu in/out plus get rid of progress bar
No longer manually set display to none on fileMenu on actions, should be
calling hideFileMenu
On showing the menu, set the opacity to 1 4ms after setting the display
to inline-block
Simply set opacity to 0 on hiding so it's more an instant hide
Get rid of progress bar reset
2013-06-05 17:08:21 +01:00
Matt Pass
ebc8e3a27b Error catching on range select
Will only now begin to select a range of files if we have selected files
already.
If not, it will add this first file as a start point.
Will also only range select if we are range selecting in the same
folder, otherwise will add this file. This enables you to select ranges
of files in different folders.
Lastly, the root has a very slightly different node structure, as we
can't start at 0 and step in increments of 2, it needs to be 1, 3, 5
etc. So as a failsafe, if the node we're looking at is not a LI,
increase the i counter by 1.
2013-06-04 18:47:06 +01:00
Matt Pass
ad8c3da48b Shift click now available to select file ranges
New vars added for the new event of shift-clicking to select ranges of
files in the file manager
Get the last file clicked and work out if the file we've just clicked is
alphabetically greater than it or not, so we end up with a startFile <
endFile and are therefore selecting from startFile downwards
In a for loop, run until we find our startFile and begin selecting.
If we're selecting and the file we're looking at isn't in our
selectedFiles array, select that file and add it to the array
Finally, when we reach our endFile, break out of the loop
2013-05-31 23:37:35 +01:00
Matt Pass
7bdeefd7e1 Only do layout things if ready, fix to path
Can only resize the file manager if ICEcoder is ready
Need a selectedFiles[0] in order to prefix to filePath
If we add a new file to the root, we end up with a ||[NEW], so replace
|| with | to fix this
Can only set tab widths if ICEcoder is ready
2013-05-31 14:32:02 +01:00
Matt Pass
f541fae982 Get function added for byte saving and clarity
New global function added called 'get'
This is because top.document.getElementById is used so often, we
actually save 2kb by having a function to return the object, plus it's
much more readable to have:
get('serverMessage').style.opacity = '1';
rather than
document.getElementById('#serverMessage').style.opacity = '1';
2013-05-30 18:11:04 +01:00
Matt Pass
054cc5cad9 newTab behind others and fix move glitch
newTab now has a z-index of 0 so that it slides behind other tabs when
new tabs are opened
serverMessage is now display: inline-block and hiding and showing is
done on moving the left position to 0 or 2000px to show or hide (doing
the show/hide on changing the display type was causing reflow issues
which seemed to mean occassionally the newTab wasn't moving to the
correct position)
2013-05-30 08:41:39 +01:00
Matt Pass
7c2d6f6fb5 Organise alpha tabs on openFiles.length
Don't run this process based on cMInstances.length but openFiles.length
which represents the tabs open
2013-05-28 18:41:16 +01:00
Matt Pass
b05954eccd Error catching when no tabs are open
Look to openFiles.length on if statements within openPreviewWindow,
closeAllTabs and alphaTabs functions so we only do these processes if we
have 1 or more tabs open
2013-05-24 09:10:37 +01:00
Matt Pass
c18630b0a5 RGB color value added to picker
Farbtastic color picker now setting RGB value and BG color in colorRGB
elem
insertColorValue function adjusted to receive any value and replace
2013-05-23 17:46:44 +01:00
Matt Pass
39d4bfe858 If our file is |[NEW], prefix selectedFiles[0]
This is so we can pick up where we are saving the new file.
2013-05-23 09:56:56 +01:00
Matt Pass
83c99f34a3 Lowercase hex used
Use lowercase hex values to be consistent with rest of ICEcoder
2013-05-21 17:05:04 +01:00
Matt Pass
59e1bc3c56 New settings to style highlights
Formatted settings to make them easier to read
Added new settings tabBGselected to tabFGnormalTab. This is so you can
change styling of ICEcoder itself a bit easier, as these colors are used
in a few places
Extra ternary conditions added to handle things better.
Black is now current, selected is blue, open is grey and normal is
transparent. Also set the FG text colour on these things too, to go with
new color scheme.
2013-05-21 16:55:09 +01:00
Matt Pass
9c4c33aa76 Increase the variations on definition matching
Covers a few more variations here, will one day integrate Tern to better
handle this.
2013-05-16 16:57:05 +01:00
Matt Pass
0c7fad798c updateByte Display and showDisplay functions
byteDisplay added as DOM elem ref
updateByteDisplay added which sets the inner HTML to be the length of
the content spilt by commas on thousands
showDisplay function added to toggle between the 2 displays
Call updateByteDisplay on switching tabs
2013-05-14 18:40:41 +01:00
Matt Pass
b8f921dab2 CTRL+o can now get remote URL
You can enter an absolute URL path (ie, anything that has :// in it) and
it will trigger a different function to get the remote URL by sending
that action to the server queue
2013-05-12 17:13:44 +01:00