Commit Graph

344 Commits

Author SHA1 Message Date
Matt Pass
a3edd7bdf9 Upgrade to CodeMirror 2.35 2012-10-26 18:04:47 +01:00
Matt Pass
75e9f916ec Opening file by mime type now
Detect if it's text based, image based or other and open as appropriate
(text = editor, image = media preview, other = new window)
2012-10-25 12:38:36 +01:00
Matt Pass
184a9d223b Save errors in error-log.txt and set default TZ
You need to set a default timezone for PHP 5.3.0 and onwards. Using
functions such as date without that throws up a warning. However,
getting it from the server causes a warning too. So, I'm getting and
setting it whilst also supressing the warning with @.
2012-10-25 11:48:40 +01:00
Matt Pass
b4c45e33e9 Better clearing of mouseDown, hide serverMessage
mouseDown = false being set now on scoll on iFrame (of File Manager) and
via CM instance for editor, so old method removed
Set serverMessages' display to inline-block when showing, none in 0.2s
when hiding
2012-10-25 11:46:32 +01:00
Matt Pass
eea960bcbd serverMessage transition only applies to opacity
Also removed 2 x display properties from tab class
2012-10-25 11:43:49 +01:00
Matt Pass
4b274f959e v1.0.0 2012-10-23 20:22:13 +01:00
Matt Pass
e66811a4e2 Removed beta tag 2012-10-23 20:21:39 +01:00
Matt Pass
139bfe775c Don't need key, simplify setting changedContent 2012-10-23 20:00:18 +01:00
Matt Pass
feb26af4bf Now logging errors in the root 2012-10-23 18:28:25 +01:00
Matt Pass
27d75f810a setup vars & check post vars before use
'server_software' also needs to be a string
2012-10-23 18:17:30 +01:00
Matt Pass
bc251d8c2b Var usage tweaks to avoid errors/notices
Check replace exists then use
Global & init vars
ICEroot is actually iceRoot
2012-10-23 18:16:25 +01:00
Matt Pass
bde9010000 init saveType before use, split is now explode 2012-10-23 18:14:34 +01:00
Matt Pass
2bb0a361aa Clear mouseDown state if over scrollbar
Clicking on scrollbar to scroll content set the mouseDown state to true
This wasn't being reset on mouse up and moving mouse pointer towards the
edge of the file manager enabled resizing of width
Now on going beyond editor width (-scrollbar of 20px), sets mouseDown to
false
2012-10-23 15:57:50 +01:00
Matt Pass
5517bf80f9 Fixing close tab issue & changedContent setting
When redoing changedContent values, no longer consider if these keys are
being pressed:
Escape (27), Caps Lock (20), Shift, CTRL, Alt, Pause/Break (16-19),
Left, Up, Right, Down (37-40), Num Lock, Scroll Lock (144-145), Insert,
Delete (45,46) <<-- mistake, Page Up, Page Down, End, Home (33-36), Left
Win Key, Right Win Key (91-92), F1-F12 (112-123)
This is because CM's changed event will not be triggered with these keys
and I'm not calling onkeypress anymore
Also, rather than now just setting and ending up being stuck at 1 (ie,
changed), we're now detecting if we have at least 1 undo level, if so
set to 1, otherwise 0
(This means you can make changes and undo back to the start and it
doesn't count as a change)
Because this is being handled on changedContent array, no longer need to
consider undo level size when figuring out close button BG colour
openFileMDTs were not being shuffled along when closing tabs but are now
Fixed issue with string replacing closeTabButtonX() - brackets not
needed
2012-10-23 15:14:36 +01:00
Matt Pass
f141e6f7a7 cMThisVer removed, establishing via CM object now
The version num is now being established from the CM object itself using
the version method
2012-10-23 14:57:26 +01:00
Matt Pass
7220288460 No longer using hardcoded CM version num
This is now being established using .version, which also indicates extra
info
(Such as '+' for post version updates included, 'beta' to signify that,
etc)
2012-10-23 14:55:54 +01:00
Matt Pass
13255bc58b Clearing global vars
theme, tabsIndent, openLastFiles, tabWidth, previousFiles, showFileMenu
& foldStyle all now contained within ICEcoder object
showFileMenu is a function to ensure file manager menu continues to show
The few instances of i now have scope
Initing the var fileName
This is to reduce the number of global vars
The only global vars should now be ICEcoder, docRoot & iceRoot
2012-10-20 23:52:36 +01:00
Matt Pass
2988de5501 v0.9.1 beta 2012-10-20 16:55:42 +01:00
Matt Pass
70a69f1c3b stickyTabWindow now stickyTab
Removed the flag variable stickyTab and stickyTabWindow now becomes this
Saves excess vars
2012-10-20 16:44:55 +01:00
Matt Pass
16e3e92c4a Fullscreen icon now changing on event handler
No longer detecting current image src and showing the opposite icon on
click
We're now changing the icon on screen change event handler
2012-10-20 16:14:56 +01:00
Matt Pass
5f1b78ea1d Login screen button now blue on hover 2012-10-20 15:27:19 +01:00
Matt Pass
9f36a8e5f8 Favicon added and using ice-coder.js & .css 2012-10-09 08:22:56 +01:00
Matt Pass
9ed344d22d Renamed to ice-coder.css and .js 2012-10-09 08:21:28 +01:00
Matt Pass
642db4c5b9 Renamed to properties.php & css 2012-10-09 07:57:28 +01:00
Matt Pass
2a93778df7 First sort of file into logical sections 2012-10-09 07:49:03 +01:00
Matt Pass
c11500b791 v0.9.0 alpha 2012-10-08 07:49:43 +01:00
Matt Pass
ee0303dc06 Code condensing
pB var setup to avoid repeating long DOM elem refs again
Removed end point from substr, not necessary
Put 3 x themes into an array and test using indexOf instead
Syntax spacing in a couple of areas
2012-10-08 07:37:08 +01:00
Matt Pass
0d55f3bd81 use showHide, fix availability bug & use regex
use showHide function where possible
Check file and fileName are available before using them
Shorten code by setting in vars and reusing
Syntax & comment simplification
Use regex to work out previousFiles (also fixed comma prefix on string)
Slight adjustment to for loop using less chars
2012-10-06 18:06:01 +01:00
Matt Pass
0e377c1aff New regex for efficiency
More specific regex used to ensure efficiency & speed are optimal
Syntax spacing adjusts on couple of other lines
2012-10-06 15:43:23 +01:00
Matt Pass
388bd7cefa Improved regex on CSS values
Looks for hex, rgb/hsl-a or colour name values in their correct format
Need match ? match[0] : '' to handle no match scenarios
2012-10-05 15:41:58 +01:00
Matt Pass
8234b3b063 newTab now innerLI & better cssColorPreview code
newTab isn't a tab at all, it's inner contents of an LI, so now called
innerLI
2nd insertBefore should be inserting newText not newLI again
New code to get CSS values via regex
Now only showing the preview if the caretLocType is CSS
2012-10-04 18:10:18 +01:00
Matt Pass
573a07026d Simplifying and condensing code
No need to return cM in getcMInstance, just return the ternary value
Shortened a few comments for clarity & byte saving
No need to add length as 2nd param on substrs in a couple of places
newTab setup as string to be used in a couple of places
Ternary shortening on elemType
Converted ternary statement back to if else to byte save on 2 ternaries
Reversing bool on codeAssist var by using ! instead
break is shorter & better too, than increasing i's value to escape
2012-10-03 21:13:35 +01:00
Matt Pass
880e04d760 Anon objects & CM's searchCursor used, fixed nest
Now just usage anonymous objects inline instead of creating for single
use
(saves adding extra vars and is less code)
Removed findLen and replaceLen as only findLen was being used twice
Replaced how we find & replace by using CM's searchcursor
Fix to the selection on hover over nest items, doesn't need -1
(This is because I fixed CM's tagRangeFinder to include last line)
2012-10-03 19:39:11 +01:00
Matt Pass
683752762d Fix to 1st line charCount & simplifying endPos.ch
If our result is within the first line, add 1 to it to fix offset
No need to have ternary case for replace all, this is now done with a
regex
2012-10-03 08:03:51 +01:00
Matt Pass
79a78e0a58 Condensing and simplification
Reducing code in many areas by condensing and simplifying
2012-10-02 07:56:05 +01:00
Matt Pass
c33bea997a Lots of ternary & array check shortening
Shorting to ternary statements instead of if else statements in many
places
Checking indexOf on arrays to condense code here too
2012-09-30 17:33:34 +01:00
Matt Pass
a2f8d9bc43 Combo moveLine function & code condensing
moveLine(dir) func added as combo of moveLineUp and moveLineDown funcs
Move initialising vars to start of func
Used indexOf to check array for shortURL instead of for loop in 2 places
Improving/removing a few comments
Condensed code to now check if selectedFiles is empty or contains right
clicked file and also condensed code to use indexOf on array instead of
for loop
Don't need foundFile because of this condensing
Using ICEcoder ref for filesFrame and also showing dropdown higher up
(next to mouse pointer/inline with file/folder name)
2012-09-30 16:24:03 +01:00
Matt Pass
80d717b4dc Condensing code & new deselectAllFiles func
Syntax format improvements on fileManager function
selectFileFolder improvements:
- Removed a load of vars we no longer need & new tgtFile var added
- 2 x areas where we deselect files/folders now done via new function
- tgtFile now avail to avoid duplicate setup
- Other much more efficient and clearer processes setup to achieve same
result
New function added to deselect all files
Ternary shortening on colouring of selected/deselected files & folders
Swapped var order around
2012-09-30 14:55:59 +01:00
Matt Pass
e14a8df6a0 Check typeof parent and swap vars around
Checking state.curState.context can cause issues is state.curState
doesn't exist so just check state.curState instead
Swapped a couple of vars round to match order of usage in func
2012-09-29 17:15:09 +01:00
Matt Pass
4be0067852 htmlTagArray defined in top settings now
updateNestingIndicator now setup on a setInterval every 30 ms
(This is due to timing issues and solves this without being noticable)
Only if we have a context for the given tag build up the array
If so, reset htmlTagArray and build up the array again
This means we stick with the old array if we're in a script or style
block (for example)
Set the tagString to be the last item in the array
If caretLocType is JS, set the tagString to script
(This is because CodeMirror doesn't recognise this as a tag)
updateNestingIndicator now works by:
- checking if we have a cM instance and not in JS, Coffee etc filetypes
- gets token information for the very end of the document
- detects if it's className is an error or not to determin if the
nesting is broken
Fix to detecting the code type we're in as without -1, JavaScript is
ignored as it's array item 0
2012-09-29 17:02:30 +01:00
Matt Pass
c717dd7bba Revised version to establish htmlTagArray
Uses a method from Marijn Haverbeke to establish an array of nested
tokens
This means chars in the document don't need to be scanned and the array
worked out in a more complex way
It means quite a few lines can be condensed down to just 3
Also means it's far less expensive on the CPU, meaning there is no
sluggishness onCursorActivity on large documents (ie typing etc)
2012-09-28 17:35:42 +01:00
Matt Pass
e0a7893578 Highlight line on moving up/down
No longer setting the cursor ch position on moving line up/down
Instead now highlighting the line that has been moved
This is done via the new function highlightLine
2012-09-28 07:52:33 +01:00
Matt Pass
6df5adf0f1 Deselect file we're closing in the file manager 2012-09-27 18:07:11 +01:00
Matt Pass
7e773e5d0a Go back to hiding code editor till loaded
Shows as a white block until loaded, so go back to having it's
visibility hidden until we're loaded and then show
2012-09-21 14:23:29 +01:00
Matt Pass
c3dbc4187f Remove iceRoot from location & perms file path
Clear iceRoot from the beginning of location (needed for when you set
your own ICEroot), so it doesn't cause DOM ID issues/mismatches
Also remove it from the file path passed through to file-control when
changing perms when you have your own ICEroot and don't show in server
message either
2012-09-21 14:22:14 +01:00
Matt Pass
6c004c3010 Remove ICEroot from path
This is applied in file control and by not removing it we have 2 x dirs
2012-09-21 09:25:58 +01:00
Matt Pass
96054295a0 Condensing code in a few areas
Reworked detecting if it's a JS, CoffeeScript, Ruby, CSS or LESS file by
switching the indexOf around
Also performed indexOf on an array rather than looking at each array
item in a for loop
Ternary shortening of code in a few areas
2012-09-20 18:15:20 +01:00
Matt Pass
640c0e9c4a Input field glow updates
Blue glow on input fields now set to 100% opacity, instead of 70%, was a
bit weak before
Also now showing on go to line input field
2012-09-20 09:41:21 +01:00
Matt Pass
ce04ef36da setLayout on creating new tab
Won't have height set on the editor instance otherwise
2012-09-20 09:29:16 +01:00
Matt Pass
c2fcdd6b9f Version 0.8.6 2012-09-20 00:13:48 +01:00