mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Merge branch 'master' into api/docs
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -76,3 +76,6 @@
|
||||
[submodule "vendor/packages/Go.tmbundle"]
|
||||
path = vendor/packages/Go.tmbundle
|
||||
url = https://github.com/rsms/Go.tmbundle
|
||||
[submodule "vendor/bootstrap"]
|
||||
path = vendor/bootstrap
|
||||
url = https://github.com/twitter/bootstrap
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
tags
|
||||
node_modules
|
||||
vendor/packages
|
||||
.git
|
||||
|
||||
@@ -6,12 +6,13 @@ about configuring, theming, and extending Atom.
|
||||
|
||||
## The Command Palette
|
||||
|
||||
If there's one key-command you learn in Atom, it should be `meta-p`. You can
|
||||
always hit `meta-p` to bring up a list of commands that are relevant to the
|
||||
currently focused UI element. If there is a key binding for a given command, it
|
||||
is also displayed. This is a great way to explore the system and get to know the
|
||||
key commands interactively. If you'd like to add or change a binding for a
|
||||
command, refer to the [key bindings](#customizing-key-bindings) section to learn how.
|
||||
If there's one key-command you learn in Atom, it should be `meta-p` (`meta` is
|
||||
synonymous with the ⌘ key). You can always hit `meta-p` to bring up a list of
|
||||
commands that are relevant to the currently focused UI element. If there is a
|
||||
key binding for a given command, it is also displayed. This is a great way to
|
||||
explore the system and get to know the key commands interactively. If you'd like
|
||||
to add or change a binding for a command, refer to the [key
|
||||
bindings](#customizing-key-bindings) section to learn how.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
"spellchecker": "0.3.0",
|
||||
"pathwatcher": "0.3.0",
|
||||
"plist": "git://github.com/nathansobo/node-plist.git",
|
||||
"space-pen": "git://github.com/nathansobo/space-pen.git"
|
||||
"space-pen": "git://github.com/nathansobo/space-pen.git",
|
||||
"less": "git://github.com/nathansobo/less.js.git"
|
||||
},
|
||||
|
||||
"devDependencies" : {
|
||||
|
||||
@@ -5,7 +5,7 @@ global.document =
|
||||
global.location =
|
||||
port: 80
|
||||
|
||||
{less} = require '../vendor/less'
|
||||
less = require 'less'
|
||||
fs = require 'fs'
|
||||
|
||||
inputFile = process.argv[2]
|
||||
@@ -19,7 +19,19 @@ unless outputFile?.length > 0
|
||||
process.exit(1)
|
||||
|
||||
contents = fs.readFileSync(inputFile)?.toString() ? ''
|
||||
(new less.Parser).parse contents, (e, tree) ->
|
||||
console.error(e.stack or e) if e
|
||||
process.exit(1) if e
|
||||
fs.writeFileSync(outputFile, tree.toCSS())
|
||||
|
||||
parser = new less.Parser
|
||||
syncImport: true
|
||||
paths: [fs.realpathSync("#{__dirname}/../static"), fs.realpathSync("#{__dirname}/../vendor")]
|
||||
filename: inputFile
|
||||
|
||||
logErrorAndExit = (e) ->
|
||||
console.error("Error compiling less file '#{inputFile}':", e.message)
|
||||
process.exit(1)
|
||||
|
||||
parser.parse contents, (e, tree) ->
|
||||
logErrorAndExit(e) if e
|
||||
try
|
||||
fs.writeFileSync(outputFile, tree.toCSS())
|
||||
catch e
|
||||
logErrorAndExit(e)
|
||||
|
||||
@@ -10,6 +10,5 @@ RESOUCES_PATH="$BUILT_PRODUCTS_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH"
|
||||
rsync --archive --recursive \
|
||||
--exclude="src/**.coffee" --exclude="src/**.cson" \
|
||||
--exclude="src/**.less" --exclude="static/**.less" \
|
||||
--exclude="node_modules/less" \
|
||||
node_modules src static vendor spec benchmark themes dot-atom atom.sh \
|
||||
"${COMPILED_SOURCES_DIR}/" "$RESOUCES_PATH"
|
||||
|
||||
@@ -8,7 +8,7 @@ describe "ImageView", ->
|
||||
path = project.resolve('binary-file.png')
|
||||
view = new ImageView()
|
||||
view.attachToDom()
|
||||
view.parent().height(100)
|
||||
view.height(100)
|
||||
|
||||
it "displays the image for a path", ->
|
||||
view.setModel(new ImageEditSession(path))
|
||||
|
||||
@@ -113,7 +113,7 @@ describe "SelectList", ->
|
||||
|
||||
miniEditor.trigger 'core:move-up'
|
||||
miniEditor.trigger 'core:move-up'
|
||||
expect(list.scrollBottom()).toBe itemHeight * 3
|
||||
expect(list.scrollTop()).toBe itemHeight
|
||||
|
||||
describe "the core:confirm event", ->
|
||||
describe "when there is an item selected (because the list in not empty)", ->
|
||||
|
||||
@@ -8,7 +8,7 @@ class AtomReporter extends View
|
||||
@div id: 'HTMLReporter', class: 'jasmine_reporter', =>
|
||||
@div outlet: 'specPopup', class: "spec-popup"
|
||||
@div outlet: "suites"
|
||||
@ul outlet: "symbolSummary", class: 'symbolSummary'
|
||||
@ul outlet: "symbolSummary", class: 'symbolSummary list-unstyled'
|
||||
@div outlet: "status", class: 'status', =>
|
||||
@div outlet: "time", class: 'time'
|
||||
@div outlet: "specCount", class: 'spec-count'
|
||||
|
||||
@@ -28,7 +28,7 @@ class AtomPackage extends Package
|
||||
else
|
||||
@requireMainModule()
|
||||
catch e
|
||||
console.warn "Failed to load package named '#{@name}'", e.stack
|
||||
console.warn "Failed to load package named '#{@name}'", e.stack ? e
|
||||
this
|
||||
|
||||
activate: ({immediate}={}) ->
|
||||
|
||||
@@ -107,14 +107,13 @@ class BufferMarker
|
||||
|
||||
handleBufferChange: (bufferChange) ->
|
||||
@consolidateObserverNotifications true, =>
|
||||
@setHeadPosition(@updatePosition(@headPosition, bufferChange, false), clip: false, bufferChanged: true)
|
||||
@setTailPosition(@updatePosition(@tailPosition, bufferChange, true), clip: false, bufferChanged: true) if @tailPosition
|
||||
@setHeadPosition(@updatePosition(@headPosition, bufferChange, true), clip: false, bufferChanged: true)
|
||||
@setTailPosition(@updatePosition(@tailPosition, bufferChange, false), clip: false, bufferChanged: true) if @tailPosition
|
||||
|
||||
updatePosition: (position, bufferChange, isFirstPoint) ->
|
||||
updatePosition: (position, bufferChange, isHead) ->
|
||||
{ oldRange, newRange } = bufferChange
|
||||
|
||||
return position if oldRange.containsPoint(position, exclusive: true)
|
||||
return position if isFirstPoint and oldRange.start.isEqual(position)
|
||||
return position if not isHead and oldRange.start.isEqual(position)
|
||||
return position if position.isLessThan(oldRange.end)
|
||||
|
||||
newRow = newRange.end.row
|
||||
|
||||
@@ -21,6 +21,7 @@ class Config
|
||||
themeDirPaths: [userThemesDirPath, bundledThemesDirPath, vendoredThemesDirPath]
|
||||
packageDirPaths: [userPackagesDirPath, vendoredPackagesDirPath, bundledPackagesDirPath]
|
||||
userPackagesDirPath: userPackagesDirPath
|
||||
lessSearchPaths: [fsUtils.join(resourcePath, 'static'), fsUtils.join(resourcePath, 'vendor')]
|
||||
defaultSettings: null
|
||||
settings: null
|
||||
configFileHasErrors: null
|
||||
|
||||
@@ -7,7 +7,7 @@ module.exports =
|
||||
class CursorView extends View
|
||||
# Internal:
|
||||
@content: ->
|
||||
@pre class: 'cursor idle', => @raw ' '
|
||||
@div class: 'cursor idle', => @raw ' '
|
||||
|
||||
blinkPeriod: 800
|
||||
editor: null
|
||||
|
||||
@@ -730,10 +730,6 @@ class Editor extends View
|
||||
@verticalScrollbar.on 'scroll', =>
|
||||
@scrollTop(@verticalScrollbar.scrollTop(), adjustVerticalScrollbar: false)
|
||||
|
||||
unless @mini
|
||||
@gutter.widthChanged = (newWidth) =>
|
||||
@scrollView.css('left', newWidth + 'px')
|
||||
|
||||
@scrollView.on 'scroll', =>
|
||||
if @scrollView.scrollLeft() == 0
|
||||
@gutter.removeClass('drop-shadow')
|
||||
@@ -766,7 +762,6 @@ class Editor extends View
|
||||
return if @attached
|
||||
@attached = true
|
||||
@calculateDimensions()
|
||||
@hiddenInput.width(@charWidth)
|
||||
@setSoftWrapColumn() if @activeEditSession.getSoftWrap()
|
||||
@subscribe $(window), "resize.editor-#{@id}", => @requestDisplayUpdate()
|
||||
@focus() if @isFocused
|
||||
@@ -1108,7 +1103,7 @@ class Editor extends View
|
||||
|
||||
# Internal:
|
||||
calculateDimensions: ->
|
||||
fragment = $('<pre class="line" style="position: absolute; visibility: hidden;"><span>x</span></div>')
|
||||
fragment = $('<div class="line" style="position: absolute; visibility: hidden;"><span>x</span></div>')
|
||||
@renderedLines.append(fragment)
|
||||
|
||||
lineRect = fragment[0].getBoundingClientRect()
|
||||
@@ -1116,7 +1111,6 @@ class Editor extends View
|
||||
@lineHeight = lineRect.height
|
||||
@charWidth = charRect.width
|
||||
@charHeight = charRect.height
|
||||
@height(@lineHeight) if @mini
|
||||
fragment.remove()
|
||||
|
||||
updateLayerDimensions: ->
|
||||
@@ -1446,7 +1440,7 @@ class Editor extends View
|
||||
|
||||
attributePairs = []
|
||||
attributePairs.push "#{attributeName}=\"#{value}\"" for attributeName, value of lineAttributes
|
||||
line.push("<pre #{attributePairs.join(' ')}>")
|
||||
line.push("<div #{attributePairs.join(' ')}>")
|
||||
|
||||
invisibles = @invisibles if @showInvisibles
|
||||
|
||||
@@ -1475,7 +1469,7 @@ class Editor extends View
|
||||
|
||||
line.push("<span class='fold-marker'/>") if fold
|
||||
|
||||
line.push('</pre>')
|
||||
line.push('</div>')
|
||||
line.join('')
|
||||
|
||||
lineElementForScreenRow: (screenRow) ->
|
||||
|
||||
@@ -16,7 +16,6 @@ class Gutter extends View
|
||||
|
||||
firstScreenRow: Infinity
|
||||
lastScreenRow: -1
|
||||
highestNumberWidth: null
|
||||
|
||||
# Internal:
|
||||
afterAttach: (onDom) ->
|
||||
|
||||
@@ -2,7 +2,7 @@ fs = require 'fs'
|
||||
fsUtils = require 'fs-utils'
|
||||
$ = require 'jquery'
|
||||
_ = require 'underscore'
|
||||
{less} = require 'less'
|
||||
less = require 'less'
|
||||
require 'jquery-extensions'
|
||||
require 'underscore-extensions'
|
||||
require 'space-pen-extensions'
|
||||
@@ -25,12 +25,7 @@ window.setUpEnvironment = ->
|
||||
$(document).on 'keydown', keymap.handleKeyEvent
|
||||
keymap.bindDefaultKeys()
|
||||
|
||||
requireStylesheet 'reset'
|
||||
requireStylesheet 'atom'
|
||||
requireStylesheet 'overlay'
|
||||
requireStylesheet 'popover-list'
|
||||
requireStylesheet 'notification'
|
||||
requireStylesheet 'markdown'
|
||||
|
||||
if nativeStylesheetPath = fsUtils.resolveOnLoadPath(process.platform, ['css', 'less'])
|
||||
requireStylesheet(nativeStylesheetPath)
|
||||
@@ -140,13 +135,28 @@ window.requireStylesheet = (path) ->
|
||||
throw new Error("Could not find a file at path '#{path}'")
|
||||
|
||||
window.loadStylesheet = (path) ->
|
||||
content = fsUtils.read(path)
|
||||
if fsUtils.extension(path) == '.less'
|
||||
(new less.Parser).parse content, (e, tree) ->
|
||||
throw new Error(e.message, path, e.line) if e
|
||||
content = tree.toCSS()
|
||||
loadLessStylesheet(path)
|
||||
else
|
||||
fsUtils.read(path)
|
||||
|
||||
content
|
||||
window.loadLessStylesheet = (path) ->
|
||||
parser = new less.Parser
|
||||
syncImport: true
|
||||
paths: config.lessSearchPaths
|
||||
filename: path
|
||||
try
|
||||
content = null
|
||||
parser.parse fsUtils.read(path), (e, tree) ->
|
||||
throw e if e?
|
||||
content = tree.toCSS()
|
||||
content
|
||||
catch e
|
||||
console.error """
|
||||
Error compiling less stylesheet: #{path}
|
||||
Line number: #{e.line}
|
||||
#{e.message}
|
||||
"""
|
||||
|
||||
window.removeStylesheet = (path) ->
|
||||
unless fullPath = window.resolveStylesheet(path)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
}
|
||||
|
||||
.autocomplete ol {
|
||||
box-sizing: content-box;
|
||||
position: relative;
|
||||
overflow-y: scroll;
|
||||
max-height: 200px;
|
||||
|
||||
@@ -49,7 +49,7 @@ class CommandPaletteView extends SelectList
|
||||
keyBindings = @keyBindings
|
||||
$$ ->
|
||||
@li class: 'event', 'data-event-name': eventName, =>
|
||||
@span eventDescription, class: 'label', title: eventName
|
||||
@span eventDescription, title: eventName
|
||||
@div class: 'right', =>
|
||||
for binding in keyBindings[eventName] ? []
|
||||
@kbd binding, class: 'key-binding'
|
||||
|
||||
@@ -24,8 +24,8 @@ describe "CommandPalette", ->
|
||||
eventLi = palette.list.children("[data-event-name='#{eventName}']")
|
||||
if description
|
||||
expect(eventLi).toExist()
|
||||
expect(eventLi.find('.label')).toHaveText(description)
|
||||
expect(eventLi.find('.label').attr('title')).toBe(eventName)
|
||||
expect(eventLi.find('span')).toHaveText(description)
|
||||
expect(eventLi.find('span').attr('title')).toBe(eventName)
|
||||
for binding in keyBindings[eventName] ? []
|
||||
expect(eventLi.find(".key-binding:contains(#{binding})")).toExist()
|
||||
else
|
||||
@@ -40,8 +40,8 @@ describe "CommandPalette", ->
|
||||
description = editorEvents[eventName] unless description
|
||||
if description
|
||||
expect(eventLi).toExist()
|
||||
expect(eventLi.find('.label')).toHaveText(description)
|
||||
expect(eventLi.find('.label').attr('title')).toBe(eventName)
|
||||
expect(eventLi.find('span')).toHaveText(description)
|
||||
expect(eventLi.find('span').attr('title')).toBe(eventName)
|
||||
else
|
||||
expect(eventLi).not.toExist()
|
||||
|
||||
@@ -92,8 +92,8 @@ describe "CommandPalette", ->
|
||||
eventLi = palette.list.children("[data-event-name='#{eventName}']")
|
||||
if description
|
||||
expect(eventLi).toExist()
|
||||
expect(eventLi.find('.label')).toHaveText(description)
|
||||
expect(eventLi.find('.label').attr('title')).toBe(eventName)
|
||||
expect(eventLi.find('span')).toHaveText(description)
|
||||
expect(eventLi.find('span').attr('title')).toBe(eventName)
|
||||
for binding in keyBindings[eventName] ? []
|
||||
expect(eventLi.find(".key-binding:contains(#{binding})")).toExist()
|
||||
else
|
||||
|
||||
@@ -13,9 +13,8 @@ class CommandPanelView extends View
|
||||
@div class: 'command-panel tool-panel', =>
|
||||
@div class: 'loading is-loading', outlet: 'loadingMessage', 'Searching...'
|
||||
@div class: 'header', outlet: 'previewHeader', =>
|
||||
@ul outlet: 'expandCollapse', class: 'expand-collapse', =>
|
||||
@li class: 'expand', 'Expand All'
|
||||
@li class: 'collapse', 'Collapse All'
|
||||
@button outlet: 'collapseAll', class: 'btn btn-mini pull-right', 'Collapse All'
|
||||
@button outlet: 'expandAll', class: 'btn btn-mini pull-right', 'Expand All'
|
||||
@span outlet: 'previewCount', class: 'preview-count'
|
||||
|
||||
@subview 'previewList', new PreviewList(rootView)
|
||||
@@ -47,8 +46,8 @@ class CommandPanelView extends View
|
||||
@subscribeToCommand rootView, 'command-panel:repeat-relative-address-in-reverse', => @repeatRelativeAddress(reverse: true)
|
||||
@subscribeToCommand rootView, 'command-panel:set-selection-as-regex-address', => @setSelectionAsLastRelativeAddress()
|
||||
|
||||
@on 'click', '.expand', @onExpandAll
|
||||
@on 'click', '.collapse', @onCollapseAll
|
||||
@expandAll.on 'click', @onExpandAll
|
||||
@collapseAll.on 'click', @onCollapseAll
|
||||
|
||||
@previewList.hide()
|
||||
@previewHeader.hide()
|
||||
|
||||
@@ -139,7 +139,8 @@ describe "CommandPanel", ->
|
||||
expect(commandPanel.previewList).toBeVisible()
|
||||
|
||||
it "shows the expand and collapse all buttons", ->
|
||||
expect(commandPanel.find('.expand-collapse')).toBeVisible()
|
||||
expect(commandPanel.collapseAll).toBeVisible()
|
||||
expect(commandPanel.expandAll).toBeVisible()
|
||||
|
||||
describe "when the preview list is focused", ->
|
||||
it "hides the command panel", ->
|
||||
|
||||
@@ -92,6 +92,11 @@
|
||||
padding: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
.matches {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.header:after {
|
||||
@@ -105,6 +110,7 @@
|
||||
.expand-collapse {
|
||||
float: right;
|
||||
-webkit-user-select: none;
|
||||
margin: 0;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
@@ -113,6 +119,7 @@
|
||||
margin-left: 5px;
|
||||
padding: 5px 10px;
|
||||
border-radius: 3px;
|
||||
line-height: normal;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,9 +131,15 @@
|
||||
-webkit-flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.error-messages {
|
||||
padding: 5px 1em;
|
||||
color: white;
|
||||
.error-messages {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 5px 1em;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ class FuzzyFinderView extends SelectList
|
||||
else
|
||||
typeClass = 'text-name'
|
||||
|
||||
@span fsUtils.base(path), class: "file label #{typeClass}"
|
||||
@span fsUtils.base(path), class: "file #{typeClass}"
|
||||
if folder = project.relativize(fsUtils.directory(path))
|
||||
@span " - #{folder}/", class: 'directory'
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class SymbolsView extends SelectList
|
||||
itemForElement: ({position, name, file}) ->
|
||||
$$ ->
|
||||
@li =>
|
||||
@div name, class: 'label'
|
||||
@span name
|
||||
if position
|
||||
text = "Line #{position.row + 1}"
|
||||
else
|
||||
|
||||
@@ -30,9 +30,9 @@ describe "SymbolsView", ->
|
||||
expect(symbolsView.find('.loading')).toBeEmpty()
|
||||
expect(rootView.find('.symbols-view')).toExist()
|
||||
expect(symbolsView.list.children('li').length).toBe 2
|
||||
expect(symbolsView.list.children('li:first').find('.label')).toHaveText 'quicksort'
|
||||
expect(symbolsView.list.children('li:first').find('span')).toHaveText 'quicksort'
|
||||
expect(symbolsView.list.children('li:first').find('.function-details')).toHaveText 'Line 1'
|
||||
expect(symbolsView.list.children('li:last').find('.label')).toHaveText 'quicksort.sort'
|
||||
expect(symbolsView.list.children('li:last').find('span')).toHaveText 'quicksort.sort'
|
||||
expect(symbolsView.list.children('li:last').find('.function-details')).toHaveText 'Line 2'
|
||||
expect(symbolsView).not.toHaveClass "error"
|
||||
expect(symbolsView.error).not.toBeVisible()
|
||||
@@ -175,7 +175,7 @@ describe "SymbolsView", ->
|
||||
editor.trigger 'symbols-view:go-to-declaration'
|
||||
symbolsView = rootView.find('.symbols-view').view()
|
||||
expect(symbolsView.list.children('li').length).toBe 1
|
||||
expect(symbolsView.list.children('li:first').find('.label')).toHaveText 'tagged.js'
|
||||
expect(symbolsView.list.children('li:first').find('span')).toHaveText 'tagged.js'
|
||||
|
||||
describe "project symbols", ->
|
||||
it "displays all tags", ->
|
||||
@@ -192,9 +192,9 @@ describe "SymbolsView", ->
|
||||
expect(symbolsView.find('.loading')).toBeEmpty()
|
||||
expect(rootView.find('.symbols-view')).toExist()
|
||||
expect(symbolsView.list.children('li').length).toBe 4
|
||||
expect(symbolsView.list.children('li:first').find('.label')).toHaveText 'callMeMaybe'
|
||||
expect(symbolsView.list.children('li:first').find('span')).toHaveText 'callMeMaybe'
|
||||
expect(symbolsView.list.children('li:first').find('.function-details')).toHaveText 'tagged.js'
|
||||
expect(symbolsView.list.children('li:last').find('.label')).toHaveText 'thisIsCrazy'
|
||||
expect(symbolsView.list.children('li:last').find('span')).toHaveText 'thisIsCrazy'
|
||||
expect(symbolsView.list.children('li:last').find('.function-details')).toHaveText 'tagged.js'
|
||||
expect(symbolsView).not.toHaveClass "error"
|
||||
expect(symbolsView.error).not.toBeVisible()
|
||||
|
||||
@@ -6,7 +6,7 @@ TabView = require './tab-view'
|
||||
module.exports =
|
||||
class TabBarView extends View
|
||||
@content: ->
|
||||
@ul tabindex: -1, class: "tabs sortable-list"
|
||||
@ul tabindex: -1, class: "list-inline tabs"
|
||||
|
||||
initialize: (@pane) ->
|
||||
@on 'dragstart', '.sortable', @onDragStart
|
||||
|
||||
@@ -6,8 +6,8 @@ module.exports =
|
||||
class TabView extends View
|
||||
@content: ->
|
||||
@li class: 'tab sortable', =>
|
||||
@span class: 'title', outlet: 'title'
|
||||
@span class: 'close-icon'
|
||||
@div class: 'title', outlet: 'title'
|
||||
@div class: 'close-icon'
|
||||
|
||||
initialize: (@item, @pane) ->
|
||||
@item.on? 'title-changed', => @updateTitle()
|
||||
|
||||
@@ -1,87 +1,59 @@
|
||||
@import "bootstrap/less/variables.less";
|
||||
@import "octicon-mixins.less";
|
||||
|
||||
@close-icon-size: 11px;
|
||||
|
||||
.tabs {
|
||||
font: caption;
|
||||
display: -webkit-flex;
|
||||
-webkit-box-align: center;
|
||||
}
|
||||
|
||||
.tab {
|
||||
-webkit-user-select: none;
|
||||
-webkit-user-drag: element;
|
||||
cursor: default;
|
||||
-webkit-flex: 1;
|
||||
width: 175px;
|
||||
max-width: 175px;
|
||||
min-width: 40px;
|
||||
box-sizing: border-box;
|
||||
text-shadow: -1px -1px 0 #000;
|
||||
font-size: 11px;
|
||||
padding: 5px 10px;
|
||||
position: relative;
|
||||
}
|
||||
margin: 0;
|
||||
|
||||
.tab.active {
|
||||
-webkit-flex: 2;
|
||||
}
|
||||
.tab {
|
||||
line-height: 30px;
|
||||
font-size: 11px;
|
||||
position: relative;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px + @close-icon-size + 2px;
|
||||
-webkit-user-drag: element;
|
||||
-webkit-flex: 1;
|
||||
max-width: 175px;
|
||||
min-width: 40px;
|
||||
|
||||
.tab .title {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
padding: 3px 10px 3px 0;
|
||||
}
|
||||
&.active {
|
||||
-webkit-flex: 2;
|
||||
}
|
||||
|
||||
.tab .close-icon {
|
||||
font-family: 'Octicons Regular';
|
||||
font-size: 12px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
right: 8px;
|
||||
top: 5px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
.title {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.tab .close-icon:before {
|
||||
content: "\f081";
|
||||
}
|
||||
.close-icon {
|
||||
.mini-icon(x, @close-icon-size);
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tab .close-icon:hover {
|
||||
color: #fff;
|
||||
}
|
||||
&.modified:hover .close-icon {
|
||||
color: #66a6ff;
|
||||
}
|
||||
|
||||
.tab.modified .close-icon {
|
||||
top: 11px;
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
right: 9px;
|
||||
border: 2px solid #66a6ff;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.tab.modified .close-icon:before {
|
||||
content: "";
|
||||
}
|
||||
|
||||
.tab.modified:hover .close-icon {
|
||||
border: none;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
right: 8px;
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
.tab.modified:hover .close-icon:before {
|
||||
content: "\f081";
|
||||
color: #66a6ff;
|
||||
&.modified:not(:hover) .close-icon {
|
||||
&:before { content: "" }
|
||||
top: 11px;
|
||||
right: 11px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border: 2px solid #66a6ff;
|
||||
border-radius: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Drag and Drop */
|
||||
.tab.is-dragging {
|
||||
|
||||
}
|
||||
|
||||
.tab.is-drop-target:before, .tab.drop-target-is-after:after {
|
||||
content: "";
|
||||
|
||||
@@ -8,10 +8,10 @@ module.exports =
|
||||
class DirectoryView extends View
|
||||
@content: ({directory, isExpanded} = {}) ->
|
||||
@li class: 'directory entry', =>
|
||||
@span class: 'highlight'
|
||||
@div outlet: 'header', class: 'header', =>
|
||||
@span class: 'disclosure-arrow', outlet: 'disclosureArrow'
|
||||
@span directory.getBaseName(), class: 'name', outlet: 'directoryName'
|
||||
@span class: 'highlight'
|
||||
|
||||
directory: null
|
||||
entries: null
|
||||
@@ -60,7 +60,7 @@ class DirectoryView extends View
|
||||
buildEntries: ->
|
||||
@unwatchDescendantEntries()
|
||||
@entries?.remove()
|
||||
@entries = $$ -> @ol class: 'entries'
|
||||
@entries = $$ -> @ol class: 'entries list-unstyled'
|
||||
for entry in @directory.getEntries()
|
||||
continue if @isPathIgnored(entry.path)
|
||||
if entry instanceof Directory
|
||||
|
||||
@@ -8,8 +8,8 @@ class FileView extends View
|
||||
|
||||
@content: ({file} = {}) ->
|
||||
@li class: 'file entry', =>
|
||||
@span file.getBaseName(), class: 'name', outlet: 'fileName'
|
||||
@span class: 'highlight'
|
||||
@span file.getBaseName(), class: 'name', outlet: 'fileName'
|
||||
|
||||
file: null
|
||||
|
||||
|
||||
@@ -11,9 +11,10 @@ _ = require 'underscore'
|
||||
module.exports =
|
||||
class TreeView extends ScrollView
|
||||
@content: (rootView) ->
|
||||
@div class: 'tree-view-wrapper', =>
|
||||
@ol class: 'tree-view tool-panel', tabindex: -1, outlet: 'treeViewList'
|
||||
@div class: 'tree-view-resizer', outlet: 'resizer'
|
||||
@div class: 'tree-view-resizer', =>
|
||||
@div class: 'tree-view-scroller', outlet: 'scroller', =>
|
||||
@ol class: 'list-unstyled tree-view tool-panel', tabindex: -1, outlet: 'list'
|
||||
@div class: 'tree-view-resize-handle', outlet: 'resizeHandle'
|
||||
|
||||
root: null
|
||||
focusAfterAttach: false
|
||||
@@ -23,7 +24,7 @@ class TreeView extends ScrollView
|
||||
initialize: (state) ->
|
||||
super
|
||||
@on 'click', '.entry', (e) => @entryClicked(e)
|
||||
@on 'mousedown', '.tree-view-resizer', (e) => @resizeStarted(e)
|
||||
@on 'mousedown', '.tree-view-resize-handle', (e) => @resizeStarted(e)
|
||||
@command 'core:move-up', => @moveUp()
|
||||
@command 'core:move-down', => @moveDown()
|
||||
@command 'core:close', => @detach(); false
|
||||
@@ -56,7 +57,6 @@ class TreeView extends ScrollView
|
||||
afterAttach: (onDom) ->
|
||||
@focus() if @focusAfterAttach
|
||||
@scrollTop(@scrollTopAfterAttach) if @scrollTopAfterAttach > 0
|
||||
@find('.selected > .highlight').width(@treeViewList[0].scrollWidth)
|
||||
|
||||
serialize: ->
|
||||
directoryExpansionStates: @root?.serializeEntryExpansionStates()
|
||||
@@ -89,10 +89,10 @@ class TreeView extends ScrollView
|
||||
rootView.focus()
|
||||
|
||||
focus: ->
|
||||
@treeViewList.focus()
|
||||
@list.focus()
|
||||
|
||||
hasFocus: ->
|
||||
@treeViewList.is(':focus')
|
||||
@list.is(':focus')
|
||||
|
||||
entryClicked: (e) ->
|
||||
entry = $(e.currentTarget).view()
|
||||
@@ -111,12 +111,10 @@ class TreeView extends ScrollView
|
||||
resizeStarted: (e) =>
|
||||
$(document.body).on('mousemove', @resizeTreeView)
|
||||
$(document.body).on('mouseup', @resizeStopped)
|
||||
@css(overflow: 'hidden')
|
||||
|
||||
resizeStopped: (e) =>
|
||||
$(document.body).off('mousemove', @resizeTreeView)
|
||||
$(document.body).off('mouseup', @resizeStopped)
|
||||
@css(overflow: 'auto')
|
||||
|
||||
resizeTreeView: (e) =>
|
||||
@css(width: e.pageX)
|
||||
@@ -126,7 +124,7 @@ class TreeView extends ScrollView
|
||||
|
||||
if rootDirectory = project.getRootDirectory()
|
||||
@root = new DirectoryView(directory: rootDirectory, isExpanded: true, project: project)
|
||||
@treeViewList.append(@root)
|
||||
@list.append(@root)
|
||||
else
|
||||
@root = null
|
||||
|
||||
@@ -162,7 +160,7 @@ class TreeView extends ScrollView
|
||||
else
|
||||
bestMatchEntry
|
||||
|
||||
@treeViewList.find(".entry").toArray().reduce(fn, @root)
|
||||
@list.find(".entry").toArray().reduce(fn, @root)
|
||||
|
||||
selectEntryForPath: (path) ->
|
||||
@selectEntry(@entryForPath(path))
|
||||
@@ -189,7 +187,7 @@ class TreeView extends ScrollView
|
||||
else
|
||||
@selectEntry(selectedEntry.parents('.directory').first())
|
||||
else
|
||||
@selectEntry(@treeViewList.find('.entry').last())
|
||||
@selectEntry(@list.find('.entry').last())
|
||||
|
||||
@scrollToEntry(@selectedEntry())
|
||||
|
||||
@@ -298,47 +296,43 @@ class TreeView extends ScrollView
|
||||
rootView.append(dialog)
|
||||
|
||||
selectedEntry: ->
|
||||
@treeViewList.find('.selected')?.view()
|
||||
@list.find('.selected')?.view()
|
||||
|
||||
selectEntry: (entry) ->
|
||||
return false unless entry.get(0)
|
||||
entry = entry.view() unless entry instanceof View
|
||||
@selectedPath = entry.getPath()
|
||||
@deselect()
|
||||
entry.children('.highlight').width(@treeViewList[0].scrollWidth)
|
||||
entry.addClass('selected')
|
||||
|
||||
deselect: ->
|
||||
@treeViewList.find('.selected').removeClass('selected').children('.highlight').width('')
|
||||
@list.find('.selected').removeClass('selected')
|
||||
|
||||
scrollTop: (top) ->
|
||||
if top
|
||||
@treeViewList.scrollTop(top)
|
||||
if top?
|
||||
@scroller.scrollTop(top)
|
||||
else
|
||||
@treeViewList.scrollTop()
|
||||
@scroller.scrollTop()
|
||||
|
||||
scrollBottom: (bottom) ->
|
||||
if bottom
|
||||
@treeViewList.scrollBottom(bottom)
|
||||
if bottom?
|
||||
@scroller.scrollBottom(bottom)
|
||||
else
|
||||
@treeViewList.scrollBottom()
|
||||
@scroller.scrollBottom()
|
||||
|
||||
scrollToEntry: (entry) ->
|
||||
displayElement = if entry instanceof DirectoryView then entry.header else entry
|
||||
top = @scrollTop() + displayElement.position().top
|
||||
top = displayElement.position().top
|
||||
bottom = top + displayElement.outerHeight()
|
||||
if bottom > @scrollBottom()
|
||||
@treeViewList.scrollBottom(bottom)
|
||||
@scrollBottom(bottom)
|
||||
if top < @scrollTop()
|
||||
@treeViewList.scrollTop(top)
|
||||
@scrollTop(top)
|
||||
|
||||
scrollToBottom: ->
|
||||
super()
|
||||
|
||||
@selectEntry(@root.find('.entry:last')) if @root
|
||||
@scrollToEntry(@root.find('.entry:last')) if @root
|
||||
|
||||
scrollToTop: ->
|
||||
super()
|
||||
@selectEntry(@root) if @root
|
||||
@treeViewList.scrollTop(0)
|
||||
@scrollTop(0)
|
||||
|
||||
@@ -101,11 +101,11 @@ describe "TreeView", ->
|
||||
it "restores the focus state of the tree view", ->
|
||||
rootView.attachToDom()
|
||||
treeView.focus()
|
||||
expect(treeView.find(".tree-view")).toMatchSelector ':focus'
|
||||
expect(treeView.list).toMatchSelector ':focus'
|
||||
atom.deactivatePackage("tree-view")
|
||||
atom.activatePackage("tree-view")
|
||||
treeView = rootView.find(".tree-view").view()
|
||||
expect(treeView.find(".tree-view")).toMatchSelector ':focus'
|
||||
expect(treeView.list).toMatchSelector ':focus'
|
||||
|
||||
it "restores the scroll top when toggled", ->
|
||||
rootView.height(5)
|
||||
@@ -142,14 +142,14 @@ describe "TreeView", ->
|
||||
rootView.focus()
|
||||
rootView.trigger 'tree-view:toggle'
|
||||
expect(treeView).toBeVisible()
|
||||
expect(treeView.find(".tree-view")).toMatchSelector(':focus')
|
||||
expect(treeView.list).toMatchSelector(':focus')
|
||||
|
||||
describe "when the tree view is hidden", ->
|
||||
it "shows and focuses the tree view", ->
|
||||
treeView.detach()
|
||||
rootView.trigger 'tree-view:toggle'
|
||||
expect(treeView.hasParent()).toBeTruthy()
|
||||
expect(treeView.find(".tree-view")).toMatchSelector(':focus')
|
||||
expect(treeView.list).toMatchSelector(':focus')
|
||||
|
||||
describe "when tree-view:reveal-current-file is triggered on the root view", ->
|
||||
beforeEach ->
|
||||
@@ -184,10 +184,10 @@ describe "TreeView", ->
|
||||
rootView.open() # When we trigger 'tool-panel:unfocus' below, we want an editor to become focused
|
||||
rootView.attachToDom()
|
||||
treeView.focus()
|
||||
expect(treeView.find(".tree-view")).toMatchSelector(':focus')
|
||||
expect(treeView.list).toMatchSelector(':focus')
|
||||
treeView.trigger 'tool-panel:unfocus'
|
||||
expect(treeView).toBeVisible()
|
||||
expect(treeView.find(".tree-view")).not.toMatchSelector(':focus')
|
||||
expect(treeView.list).not.toMatchSelector(':focus')
|
||||
expect(rootView.getActiveView().isFocused).toBeTruthy()
|
||||
|
||||
describe "when core:close is triggered on the tree view", ->
|
||||
@@ -428,7 +428,7 @@ describe "TreeView", ->
|
||||
treeView.height(100)
|
||||
treeView.attachToDom()
|
||||
$(element).view().expand() for element in treeView.find('.directory')
|
||||
expect(treeView.find(".tree-view").prop('scrollHeight')).toBeGreaterThan treeView.find(".tree-view").outerHeight()
|
||||
expect(treeView.list.outerHeight()).toBeGreaterThan treeView.scroller.outerHeight()
|
||||
|
||||
expect(treeView.scrollTop()).toBe 0
|
||||
|
||||
@@ -452,11 +452,11 @@ describe "TreeView", ->
|
||||
treeView.height(100)
|
||||
treeView.attachToDom()
|
||||
$(element).view().expand() for element in treeView.find('.directory')
|
||||
expect(treeView.find(".tree-view").prop('scrollHeight')).toBeGreaterThan treeView.find(".tree-view").outerHeight()
|
||||
expect(treeView.list.outerHeight()).toBeGreaterThan treeView.scroller.outerHeight()
|
||||
|
||||
expect(treeView.scrollTop()).toBe 0
|
||||
treeView.trigger 'core:move-to-bottom'
|
||||
expect(treeView.scrollBottom()).toBe treeView.find(".tree-view").prop('scrollHeight')
|
||||
expect(treeView.scrollBottom()).toBe treeView.root.outerHeight()
|
||||
|
||||
it "selects the last entry", ->
|
||||
expect(treeView.root).toHaveClass 'selected'
|
||||
@@ -468,7 +468,7 @@ describe "TreeView", ->
|
||||
treeView.height(5)
|
||||
treeView.attachToDom()
|
||||
$(element).view().expand() for element in treeView.find('.directory')
|
||||
expect(treeView.find(".tree-view").prop('scrollHeight')).toBeGreaterThan treeView.find(".tree-view").outerHeight()
|
||||
expect(treeView.list.outerHeight()).toBeGreaterThan treeView.scroller.outerHeight()
|
||||
|
||||
expect(treeView.scrollTop()).toBe 0
|
||||
treeView.scrollToBottom()
|
||||
@@ -483,7 +483,7 @@ describe "TreeView", ->
|
||||
treeView.height(5)
|
||||
treeView.attachToDom()
|
||||
$(element).view().expand() for element in treeView.find('.directory')
|
||||
expect(treeView.find(".tree-view").prop('scrollHeight')).toBeGreaterThan treeView.find(".tree-view").outerHeight()
|
||||
expect(treeView.list.outerHeight()).toBeGreaterThan treeView.scroller.outerHeight()
|
||||
|
||||
expect(treeView.scrollTop()).toBe 0
|
||||
treeView.trigger 'core:page-down'
|
||||
@@ -494,14 +494,16 @@ describe "TreeView", ->
|
||||
treeView.height(100)
|
||||
treeView.attachToDom()
|
||||
$(element).view().expand() for element in treeView.find('.directory')
|
||||
expect(treeView.find(".tree-view").prop('scrollHeight')).toBeGreaterThan treeView.find(".tree-view").outerHeight()
|
||||
expect(treeView.list.outerHeight()).toBeGreaterThan treeView.scroller.outerHeight()
|
||||
|
||||
treeView.moveDown()
|
||||
expect(treeView.scrollTop()).toBe 0
|
||||
|
||||
entryCount = treeView.find(".entry").length
|
||||
entryHeight = treeView.find('.file').height()
|
||||
|
||||
_.times entryCount, -> treeView.moveDown()
|
||||
expect(treeView.scrollBottom()).toBe treeView.find(".tree-view").prop('scrollHeight')
|
||||
expect(treeView.scrollBottom()).toBeGreaterThan (entryCount * entryHeight) - 1
|
||||
|
||||
_.times entryCount, -> treeView.moveUp()
|
||||
expect(treeView.scrollTop()).toBe 0
|
||||
|
||||
@@ -1,153 +1,16 @@
|
||||
.tree-view .entries {
|
||||
margin-left: 12px;
|
||||
}
|
||||
@import "bootstrap/less/variables.less";
|
||||
@import "octicon-mixins.less";
|
||||
|
||||
.tree-view .entries .file .name {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.tree-view .file .name,
|
||||
.tree-view .directory .header {
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.tree-view .directory .header {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.tree-view-dialog {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.tree-view-dialog .prompt {
|
||||
padding-bottom: 3px;
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.tree-view-dialog .prompt span {
|
||||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
|
||||
.tree-view-dialog .prompt:before {
|
||||
font-family: 'Octicons Regular';
|
||||
font-size: 16px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 3px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.tree-view-dialog .prompt.add-file:before {
|
||||
content: "\f086";
|
||||
}
|
||||
|
||||
.tree-view-dialog .prompt.add-directory:before {
|
||||
content: "\f095";
|
||||
}
|
||||
|
||||
.tree-view-dialog .prompt.move:before {
|
||||
content: "\f03e";
|
||||
}
|
||||
|
||||
.tree-view .directory .header .name,
|
||||
.tree-view .file .name {
|
||||
position: relative;
|
||||
padding-left: 21px;
|
||||
}
|
||||
|
||||
.tree-view .directory .header .name:before,
|
||||
.tree-view .file .name:before {
|
||||
font-family: 'Octicons Regular';
|
||||
font-size: 16px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 5px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.tree-view .disclosure-arrow:before {
|
||||
font-family: 'Octicons Regular';
|
||||
font-size: 12px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
line-height: 16px;
|
||||
margin-right: 3px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.tree-view .directory .header .directory-icon:before {
|
||||
content: "\f016";
|
||||
top: -5px;
|
||||
}
|
||||
|
||||
.tree-view .directory .header .repository-icon:before {
|
||||
content: "\f001";
|
||||
top: -4px;
|
||||
}
|
||||
|
||||
.tree-view .directory .header .submodule-icon:before {
|
||||
content: "\f017";
|
||||
top: -5px;
|
||||
}
|
||||
|
||||
.tree-view .file .text-icon:before {
|
||||
content: "\f011";
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
.tree-view .file .image-icon:before {
|
||||
content: "\f012";
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
.tree-view .file .compressed-icon:before {
|
||||
content: "\f013";
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
.tree-view .file .pdf-icon:before {
|
||||
content: "\f014";
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
.tree-view .file .readme-icon:before {
|
||||
content: "\f007";
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
.tree-view .file .binary-icon:before {
|
||||
content: "\f094";
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
.tree-view .file .symlink-icon:before {
|
||||
content: "\f09b";
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
.tree-view .directory > .header .disclosure-arrow:before {
|
||||
content: "\f05a";
|
||||
}
|
||||
|
||||
.tree-view .directory.expanded > .header .disclosure-arrow:before {
|
||||
content: "\f05b";
|
||||
}
|
||||
|
||||
.tree-view-wrapper {
|
||||
.tree-view-resizer {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
cursor: default;
|
||||
-webkit-user-select: none;
|
||||
min-width: 50px;
|
||||
z-index: 2;
|
||||
|
||||
.tree-view-resizer {
|
||||
.tree-view-resize-handle {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
@@ -158,41 +21,108 @@
|
||||
}
|
||||
}
|
||||
|
||||
.tree-view {
|
||||
position: relative;
|
||||
cursor: default;
|
||||
-webkit-user-select: none;
|
||||
overflow: auto;
|
||||
.tree-view-scroller {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.tree-view {
|
||||
min-width: -webkit-min-content;
|
||||
min-height: 100%;
|
||||
@item-line-height: @line-height-base * 1.25;
|
||||
@disclosure-arrow-size: 12px;
|
||||
@icon-margin: @line-height-base / 4;
|
||||
|
||||
position: relative;
|
||||
padding: 0 @icon-margin;
|
||||
margin-bottom: 0;
|
||||
cursor: default;
|
||||
|
||||
.entry {
|
||||
text-wrap: none;
|
||||
white-space: nowrap;
|
||||
|
||||
& > .header,
|
||||
> .name {
|
||||
z-index: 1;
|
||||
.name {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
&.selected > .highlight {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: @item-line-height;
|
||||
}
|
||||
}
|
||||
|
||||
.selected > .highlight {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 24px;
|
||||
.directory {
|
||||
> .header {
|
||||
line-height: @item-line-height;
|
||||
.disclosure-arrow { margin-right: @icon-margin; }
|
||||
}
|
||||
|
||||
.entries {
|
||||
margin-left: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.disclosure-arrow {
|
||||
display: inline-block;
|
||||
.file {
|
||||
line-height: @item-line-height;
|
||||
|
||||
.name {
|
||||
margin-left: @disclosure-arrow-size + @icon-margin;
|
||||
}
|
||||
}
|
||||
|
||||
// icons
|
||||
.name:before {
|
||||
margin-right: @icon-margin;
|
||||
position: relative;
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
.directory > .header {
|
||||
.disclosure-arrow {
|
||||
.mini-icon(arr-collapsed, @disclosure-arrow-size);
|
||||
position: relative;
|
||||
}
|
||||
.directory-icon { .mini-icon(directory); }
|
||||
.repository-icon { .mini-icon(public-repo); }
|
||||
.submodule-icon { .mini-icon(submodule); }
|
||||
}
|
||||
|
||||
.directory.expanded > .header {
|
||||
.disclosure-arrow { .mini-icon(arr-expanded, @disclosure-arrow-size); }
|
||||
}
|
||||
|
||||
.file {
|
||||
.text-icon { .mini-icon(text-file); }
|
||||
.image-icon { .mini-icon(download-media); }
|
||||
.compressed-icon { .mini-icon(download-zip); }
|
||||
.pdf-icon { .mini-icon(download-pdf); }
|
||||
.readme-icon { .mini-icon(readme); }
|
||||
.binary-icon { .mini-icon(binary-file); }
|
||||
.symlink-icon { .mini-icon(symlink); }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.tree-view-dialog {
|
||||
padding: 5px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
|
||||
.prompt {
|
||||
padding-bottom: 3px;
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
&:before { margin-right: @line-height-base / 4; }
|
||||
&.add-file { .mini-icon(new-file); }
|
||||
&.add-directory { .mini-icon(create-directory); }
|
||||
&.prompt.move { .mini-icon(arr-right); }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
module.exports =
|
||||
activate: ->
|
||||
rootView.eachBuffer (buffer) => @whitespaceBeforeSave(buffer)
|
||||
rootView.eachEditSession (editSession) => @whitespaceBeforeSave(editSession)
|
||||
|
||||
configDefaults:
|
||||
ensureSingleTrailingNewline: true
|
||||
|
||||
whitespaceBeforeSave: (buffer) ->
|
||||
whitespaceBeforeSave: (editSession) ->
|
||||
buffer = editSession.buffer
|
||||
buffer.on 'will-be-saved', ->
|
||||
buffer.transact ->
|
||||
buffer.scan /[ \t]+$/g, ({replace}) -> replace('')
|
||||
@@ -16,4 +17,6 @@ module.exports =
|
||||
while row and buffer.lineForRow(row) is ''
|
||||
buffer.deleteRow(row--)
|
||||
else
|
||||
selectedBufferRanges = editSession.getSelectedBufferRanges()
|
||||
buffer.append('\n')
|
||||
editSession.setSelectedBufferRanges(selectedBufferRanges)
|
||||
|
||||
@@ -79,3 +79,10 @@ describe "Whitespace", ->
|
||||
editor.insertText "no trailing newline"
|
||||
editor.getBuffer().save()
|
||||
expect(editor.getText()).toBe "no trailing newline"
|
||||
|
||||
it "does not move the cursor when the new line is added", ->
|
||||
editor.insertText "foo"
|
||||
expect(editor.getCursorBufferPosition()).toEqual([0,3])
|
||||
editor.getBuffer().save()
|
||||
expect(editor.getText()).toBe "foo\n"
|
||||
expect(editor.getCursorBufferPosition()).toEqual([0,3])
|
||||
|
||||
@@ -14,7 +14,8 @@ module.exports =
|
||||
readObjectAsync: (path, done) ->
|
||||
fs.readFile path, 'utf8', (err, contents) =>
|
||||
return done(err) if err?
|
||||
try done(null, @parseObject(path, contents))
|
||||
try
|
||||
done(null, @parseObject(path, contents))
|
||||
catch err
|
||||
done(err)
|
||||
|
||||
|
||||
@@ -1,86 +1,10 @@
|
||||
html, body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#root-view {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
#horizontal {
|
||||
display: -webkit-flex;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#vertical {
|
||||
display: -webkit-flex;
|
||||
-webkit-flex: 1;
|
||||
-webkit-flex-flow: column;
|
||||
}
|
||||
}
|
||||
|
||||
#panes {
|
||||
position: relative;
|
||||
-webkit-flex: 1;
|
||||
|
||||
.column {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.row {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.pane {
|
||||
position: absolute;
|
||||
display: -webkit-flex;
|
||||
-webkit-flex-flow: column;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.pane .item-views {
|
||||
-webkit-flex: 1;
|
||||
display: -webkit-flex;
|
||||
-webkit-flex-flow: column;
|
||||
}
|
||||
|
||||
.pane .item-views > * {
|
||||
-webkit-flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Octicons Regular';
|
||||
src: url("octicons-regular-webfont.woff") format("woff");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.is-loading {
|
||||
background-image: url(images/spinner.svg);
|
||||
background-repeat: no-repeat;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
opacity: 0.5;
|
||||
background-size: contain;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
padding-left: 19px;
|
||||
@import "bootstrap/less/bootstrap.less";
|
||||
@import "root-view.less";
|
||||
@import "overlay.less";
|
||||
@import "popover-list.less";
|
||||
@import "notification.less";
|
||||
@import "markdown.less";
|
||||
|
||||
:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
cursor: default;
|
||||
min-width: 1em;
|
||||
box-sizing: border-box;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.editor .gutter .line-number {
|
||||
@@ -139,6 +138,10 @@
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.editor .line {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.editor .line span {
|
||||
vertical-align: top;
|
||||
}
|
||||
@@ -158,11 +161,14 @@
|
||||
}
|
||||
|
||||
.editor .hidden-input {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
top: 0;
|
||||
left: 0;
|
||||
opacity: 0;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.editor .selection .region {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
overflow: auto;
|
||||
|
||||
img {
|
||||
box-sizing: content-box;
|
||||
padding: 25px;
|
||||
border: 2px solid;
|
||||
background-image: url(images/transparent-background.gif);
|
||||
|
||||
@@ -25,7 +25,7 @@ body {
|
||||
#HTMLReporter .symbolSummary {
|
||||
background-color: #222;
|
||||
overflow: hidden;
|
||||
*zoom: 1
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#HTMLReporter .symbolSummary li {
|
||||
|
||||
171
static/mega-octicon-utf-codes.less
Normal file
171
static/mega-octicon-utf-codes.less
Normal file
@@ -0,0 +1,171 @@
|
||||
@private-repo: "\f26a";
|
||||
@public-repo: "\f201";
|
||||
@repo-forked: "\f202";
|
||||
@create: "\f203";
|
||||
@delete: "\f204";
|
||||
@push: "\f205";
|
||||
@pull: "\f206";
|
||||
@readme: "\f207";
|
||||
@wiki: "\f207";
|
||||
@octocat: "\f208";
|
||||
@site-message: "\f209";
|
||||
@blacktocat: "\f209";
|
||||
@invertocat: "\f20a";
|
||||
@download: "\f20b";
|
||||
@upload: "\f20c";
|
||||
@keyboard: "\f20d";
|
||||
@gist: "\f20e";
|
||||
@gist-private: "\f20f";
|
||||
@code-file: "\f210";
|
||||
@download-unknown: "\f210";
|
||||
@download-text: "\f211";
|
||||
@text-file: "\f211";
|
||||
@download-media: "\f212";
|
||||
@download-zip: "\f213";
|
||||
@download-pdf: "\f214";
|
||||
@download-tag: "\f215";
|
||||
@tag: "\f215";
|
||||
@directory: "\f216";
|
||||
@submodule: "\f217";
|
||||
@person: "\f218";
|
||||
@team: "\f219";
|
||||
@member-added: "\f21a";
|
||||
@member-removed: "\f21b";
|
||||
@follow: "\f21c";
|
||||
@watching: "\f21d";
|
||||
@unwatch: "\f21e";
|
||||
@commit: "\f21f";
|
||||
@public-fork: "\f220";
|
||||
@fork: "\f220";
|
||||
@branch: "\f220";
|
||||
@tree: "\f220";
|
||||
@private-fork: "\f221";
|
||||
@pull-request: "\f222";
|
||||
@merge: "\f223";
|
||||
@public-mirror: "\f224";
|
||||
@private-mirror: "\f225";
|
||||
@issue-opened: "\f226";
|
||||
@issue-reopened: "\f227";
|
||||
@issue-closed: "\f228";
|
||||
@issue-comment: "\f229";
|
||||
@star: "\f22a";
|
||||
@commit-comment: "\f22b";
|
||||
@help: "\f22c";
|
||||
@exclamation: "\f22d";
|
||||
@search-input: "\f22e";
|
||||
@advanced-search: "\f22f";
|
||||
@notifications: "\f230";
|
||||
@account-settings: "\f231";
|
||||
@logout: "\f232";
|
||||
@admin-tools: "\f233";
|
||||
@feed: "\f234";
|
||||
@clipboard: "\f235";
|
||||
@apple: "\f236";
|
||||
@windows: "\f237";
|
||||
@ios: "\f238";
|
||||
@download-android: "\f239";
|
||||
@android: "\f239";
|
||||
@confirm: "\f23a";
|
||||
@unread-note: "\f23b";
|
||||
@read-note: "\f23c";
|
||||
@arr-up: "\f23d";
|
||||
@arr-right: "\f23e";
|
||||
@arr-down: "\f23f";
|
||||
@arr-left: "\f240";
|
||||
@pin: "\f241";
|
||||
@gift: "\f242";
|
||||
@graph: "\f243";
|
||||
@wrench: "\f244";
|
||||
@credit-card: "\f245";
|
||||
@time: "\f246";
|
||||
@ruby: "\f247";
|
||||
@podcast: "\f248";
|
||||
@key: "\f249";
|
||||
@force-push: "\f24a";
|
||||
@sync: "\f24b";
|
||||
@clone: "\f24c";
|
||||
@diff: "\f24d";
|
||||
@watchers: "\f24e";
|
||||
@discussion: "\f24f";
|
||||
@delete-note: "\f250";
|
||||
@remove-close: "\f250";
|
||||
@reply: "\f251";
|
||||
@mail-status: "\f252";
|
||||
@block: "\f253";
|
||||
@tag-create: "\f254";
|
||||
@tab-delete: "\f255";
|
||||
@branch-create: "\f256";
|
||||
@branch-delete: "\f257";
|
||||
@edit: "\f258";
|
||||
@info: "\f259";
|
||||
@arr-collapsed: "\f25a";
|
||||
@arr-expanded: "\f25b";
|
||||
@link: "\f25c";
|
||||
@add: "\f25d";
|
||||
@reorder: "\f25e";
|
||||
@code: "\f25f";
|
||||
@location: "\f260";
|
||||
@u-list: "\f261";
|
||||
@o-list: "\f262";
|
||||
@quotemark: "\f263";
|
||||
@version: "\f264";
|
||||
@brightness: "\f265";
|
||||
@fullscreen: "\f266";
|
||||
@normalscreen: "\f267";
|
||||
@calendar: "\f268";
|
||||
@beer: "\f269";
|
||||
@secure: "\f26a";
|
||||
@lock: "\f26a";
|
||||
@added: "\f26b";
|
||||
@removed: "\f26c";
|
||||
@modified: "\f26d";
|
||||
@moved: "\f26e";
|
||||
@renamed: "\f26e";
|
||||
@add-comment: "\f26f";
|
||||
@horizontal-rule: "\f270";
|
||||
@arr-right-mini: "\f271";
|
||||
@jump-down: "\f272";
|
||||
@jump-up: "\f273";
|
||||
@reference: "\f274";
|
||||
@milestone: "\f275";
|
||||
@save-document: "\f276";
|
||||
@megaphone: "\f277";
|
||||
@chevron: "\f278";
|
||||
@gist-forked: "\f279";
|
||||
@gist-add: "\f27a";
|
||||
@bookmark: "\f27b";
|
||||
@filters: "\f27c";
|
||||
@dashboard: "\f27d";
|
||||
@history: "\f27e";
|
||||
@external-link: "\f27f";
|
||||
@mute: "\f280";
|
||||
@x: "\f281";
|
||||
@add-star: "\f282";
|
||||
@remove-star: "\f283";
|
||||
@circle-slash: "\f284";
|
||||
@pulse: "\f285";
|
||||
@new-file: "\f286";
|
||||
@refresh: "\f287";
|
||||
@telescope: "\f288";
|
||||
@microscope: "\f289";
|
||||
@align: "\f28a";
|
||||
@unalign: "\f28b";
|
||||
@gist-secret: "\f28c";
|
||||
@home: "\f28d";
|
||||
@aligned-to: "\f28e";
|
||||
@stop-spam: "\f28f";
|
||||
@zap: "\f290";
|
||||
@bug: "\f291";
|
||||
@loading-inner: "\f292";
|
||||
@loading-outer: "\f293";
|
||||
@binary-file: "\f294";
|
||||
@create-directory: "\f295";
|
||||
@database: "\f296";
|
||||
@server: "\f297";
|
||||
@ignored-file: "\f298";
|
||||
@ignore: "\f299";
|
||||
@ellipsis: "\f29a";
|
||||
@symlink: "\f29b";
|
||||
@no-newline: "\f29c";
|
||||
@hubot: "\f29d";
|
||||
@hourglass: "\f29e";
|
||||
171
static/mini-octicon-utf-codes.less
Normal file
171
static/mini-octicon-utf-codes.less
Normal file
@@ -0,0 +1,171 @@
|
||||
@private-repo: "\f06a";
|
||||
@public-repo: "\f001";
|
||||
@repo-forked: "\f002";
|
||||
@create: "\f003";
|
||||
@delete: "\f004";
|
||||
@push: "\f005";
|
||||
@pull: "\f006";
|
||||
@readme: "\f007";
|
||||
@wiki: "\f007";
|
||||
@octocat: "\f008";
|
||||
@site-message: "\f009";
|
||||
@blacktocat: "\f009";
|
||||
@invertocat: "\f00a";
|
||||
@download: "\f00b";
|
||||
@upload: "\f00c";
|
||||
@keyboard: "\f00d";
|
||||
@gist: "\f00e";
|
||||
@gist-private: "\f00f";
|
||||
@code-file: "\f010";
|
||||
@download-unknown: "\f010";
|
||||
@download-text: "\f011";
|
||||
@text-file: "\f011";
|
||||
@download-media: "\f012";
|
||||
@download-zip: "\f013";
|
||||
@download-pdf: "\f014";
|
||||
@download-tag: "\f015";
|
||||
@tag: "\f015";
|
||||
@directory: "\f016";
|
||||
@submodule: "\f017";
|
||||
@person: "\f018";
|
||||
@team: "\f019";
|
||||
@member-added: "\f01a";
|
||||
@member-removed: "\f01b";
|
||||
@follow: "\f01c";
|
||||
@watching: "\f01d";
|
||||
@unwatch: "\f01e";
|
||||
@commit: "\f01f";
|
||||
@public-fork: "\f020";
|
||||
@fork: "\f020";
|
||||
@branch: "\f020";
|
||||
@tree: "\f020";
|
||||
@private-fork: "\f021";
|
||||
@pull-request: "\f022";
|
||||
@merge: "\f023";
|
||||
@public-mirror: "\f024";
|
||||
@private-mirror: "\f025";
|
||||
@issue-opened: "\f026";
|
||||
@issue-reopened: "\f027";
|
||||
@issue-closed: "\f028";
|
||||
@issue-comment: "\f029";
|
||||
@star: "\f02a";
|
||||
@commit-comment: "\f02b";
|
||||
@help: "\f02c";
|
||||
@exclamation: "\f02d";
|
||||
@search-input: "\f02e";
|
||||
@advanced-search: "\f02f";
|
||||
@notifications: "\f030";
|
||||
@account-settings: "\f031";
|
||||
@logout: "\f032";
|
||||
@admin-tools: "\f033";
|
||||
@feed: "\f034";
|
||||
@clipboard: "\f035";
|
||||
@apple: "\f036";
|
||||
@windows: "\f037";
|
||||
@ios: "\f038";
|
||||
@download-android: "\f039";
|
||||
@android: "\f039";
|
||||
@confirm: "\f03a";
|
||||
@unread-note: "\f03b";
|
||||
@read-note: "\f03c";
|
||||
@arr-up: "\f03d";
|
||||
@arr-right: "\f03e";
|
||||
@arr-down: "\f03f";
|
||||
@arr-left: "\f040";
|
||||
@pin: "\f041";
|
||||
@gift: "\f042";
|
||||
@graph: "\f043";
|
||||
@wrench: "\f044";
|
||||
@credit-card: "\f045";
|
||||
@time: "\f046";
|
||||
@ruby: "\f047";
|
||||
@podcast: "\f048";
|
||||
@key: "\f049";
|
||||
@force-push: "\f04a";
|
||||
@sync: "\f04b";
|
||||
@clone: "\f04c";
|
||||
@diff: "\f04d";
|
||||
@watchers: "\f04e";
|
||||
@discussion: "\f04f";
|
||||
@delete-note: "\f050";
|
||||
@remove-close: "\f050";
|
||||
@reply: "\f051";
|
||||
@mail-status: "\f052";
|
||||
@block: "\f053";
|
||||
@tag-create: "\f054";
|
||||
@tab-delete: "\f055";
|
||||
@branch-create: "\f056";
|
||||
@branch-delete: "\f057";
|
||||
@edit: "\f058";
|
||||
@info: "\f059";
|
||||
@arr-collapsed: "\f05a";
|
||||
@arr-expanded: "\f05b";
|
||||
@link: "\f05c";
|
||||
@add: "\f05d";
|
||||
@reorder: "\f05e";
|
||||
@code: "\f05f";
|
||||
@location: "\f060";
|
||||
@u-list: "\f061";
|
||||
@o-list: "\f062";
|
||||
@quotemark: "\f063";
|
||||
@version: "\f064";
|
||||
@brightness: "\f065";
|
||||
@fullscreen: "\f066";
|
||||
@normalscreen: "\f067";
|
||||
@calendar: "\f068";
|
||||
@beer: "\f069";
|
||||
@secure: "\f06a";
|
||||
@lock: "\f06a";
|
||||
@added: "\f06b";
|
||||
@removed: "\f06c";
|
||||
@modified: "\f06d";
|
||||
@moved: "\f06e";
|
||||
@renamed: "\f06e";
|
||||
@add-comment: "\f06f";
|
||||
@horizontal-rule: "\f070";
|
||||
@arr-right-mini: "\f071";
|
||||
@jump-down: "\f072";
|
||||
@jump-up: "\f073";
|
||||
@reference: "\f074";
|
||||
@milestone: "\f075";
|
||||
@save-document: "\f076";
|
||||
@megaphone: "\f077";
|
||||
@chevron: "\f078";
|
||||
@gist-forked: "\f079";
|
||||
@gist-add: "\f07a";
|
||||
@bookmark: "\f07b";
|
||||
@filters: "\f07c";
|
||||
@dashboard: "\f07d";
|
||||
@history: "\f07e";
|
||||
@external-link: "\f07f";
|
||||
@mute: "\f080";
|
||||
@x: "\f081";
|
||||
@add-star: "\f082";
|
||||
@remove-star: "\f083";
|
||||
@circle-slash: "\f084";
|
||||
@pulse: "\f085";
|
||||
@new-file: "\f086";
|
||||
@refresh: "\f087";
|
||||
@telescope: "\f088";
|
||||
@microscope: "\f089";
|
||||
@align: "\f08a";
|
||||
@unalign: "\f08b";
|
||||
@gist-secret: "\f08c";
|
||||
@home: "\f08d";
|
||||
@aligned-to: "\f08e";
|
||||
@stop-spam: "\f08f";
|
||||
@zap: "\f090";
|
||||
@bug: "\f091";
|
||||
@loading-inner: "\f092";
|
||||
@loading-outer: "\f093";
|
||||
@binary-file: "\f094";
|
||||
@create-directory: "\f095";
|
||||
@database: "\f096";
|
||||
@server: "\f097";
|
||||
@ignored-file: "\f098";
|
||||
@ignore: "\f099";
|
||||
@ellipsis: "\f09a";
|
||||
@symlink: "\f09b";
|
||||
@no-newline: "\f09c";
|
||||
@hubot: "\f09d";
|
||||
@hourglass: "\f09e";
|
||||
33
static/octicon-mixins.less
Normal file
33
static/octicon-mixins.less
Normal file
@@ -0,0 +1,33 @@
|
||||
.icon() {
|
||||
font-family: 'Octicons Regular';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
line-height: 1;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.icon(@size) {
|
||||
.icon;
|
||||
font-size: @size;
|
||||
width: @size;
|
||||
height: @size;
|
||||
}
|
||||
|
||||
.mini-icon(@name, @size: 16px) {
|
||||
@import "mini-octicon-utf-codes.less";
|
||||
&:before {
|
||||
.icon(@size);
|
||||
content: @@name
|
||||
}
|
||||
}
|
||||
|
||||
.mega-icon(@name, @size: 32px) {
|
||||
@import "mega-octicon-utf-codes.less";
|
||||
&:before {
|
||||
.icon(@size);
|
||||
content: @@name
|
||||
}
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
/* --------------------------------------------------------------
|
||||
|
||||
reset.css
|
||||
* Resets default browser CSS.
|
||||
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
html {
|
||||
margin:0;
|
||||
padding:0;
|
||||
border:0;
|
||||
}
|
||||
|
||||
body, div, span, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, code,
|
||||
del, dfn, em, img, q, dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, dialog, figure, footer, header,
|
||||
hgroup, nav, section {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
/* This helps to make newer HTML5 elements behave like DIVs in older browers */
|
||||
article, aside, details, figcaption, figure, dialog,
|
||||
footer, header, hgroup, menu, nav, section {
|
||||
display:block;
|
||||
}
|
||||
|
||||
/* Line-height should always be unitless! */
|
||||
body {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* Tables still need 'cellspacing="0"' in the markup. */
|
||||
table {
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
}
|
||||
/* float:none prevents the span-x classes from breaking table-cell display */
|
||||
caption, th, td {
|
||||
text-align: left;
|
||||
font-weight: normal;
|
||||
float:none !important;
|
||||
}
|
||||
table, th, td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* Remove possible quote marks (") from <q>, <blockquote>. */
|
||||
blockquote:before, blockquote:after, q:before, q:after { content: ''; }
|
||||
blockquote, q { quotes: "" ""; }
|
||||
|
||||
/* Remove annoying border on linked images. */
|
||||
a img { border: none; }
|
||||
|
||||
/* Remember to define your own focus styles! */
|
||||
:focus { outline: 0; }
|
||||
86
static/root-view.less
Normal file
86
static/root-view.less
Normal file
@@ -0,0 +1,86 @@
|
||||
html, body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#root-view {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
#horizontal {
|
||||
display: -webkit-flex;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#vertical {
|
||||
display: -webkit-flex;
|
||||
-webkit-flex: 1;
|
||||
-webkit-flex-flow: column;
|
||||
}
|
||||
}
|
||||
|
||||
#panes {
|
||||
position: relative;
|
||||
-webkit-flex: 1;
|
||||
|
||||
.column {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.row {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.pane {
|
||||
position: absolute;
|
||||
display: -webkit-flex;
|
||||
-webkit-flex-flow: column;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.pane .item-views {
|
||||
-webkit-flex: 1;
|
||||
display: -webkit-flex;
|
||||
-webkit-flex-flow: column;
|
||||
}
|
||||
|
||||
.pane .item-views > * {
|
||||
-webkit-flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Octicons Regular';
|
||||
src: url("octicons-regular-webfont.woff") format("woff");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.is-loading {
|
||||
background-image: url(images/spinner.svg);
|
||||
background-repeat: no-repeat;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
opacity: 0.5;
|
||||
background-size: contain;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
padding-left: 19px;
|
||||
}
|
||||
@@ -1,61 +1,51 @@
|
||||
.select-list ol {
|
||||
border: 1px solid #212121;
|
||||
position: relative;
|
||||
overflow-y: auto;
|
||||
max-height: 312px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: 100%;
|
||||
-webkit-user-select: none;
|
||||
cursor: default;
|
||||
}
|
||||
@import "octicon-mixins.less";
|
||||
|
||||
.select-list ol:empty {
|
||||
border: none;
|
||||
}
|
||||
.select-list {
|
||||
.error {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.select-list ol li {
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
}
|
||||
ol {
|
||||
position: relative;
|
||||
overflow-y: auto;
|
||||
max-height: 312px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
.select-list li .label {
|
||||
display: inline-block;
|
||||
}
|
||||
&:empty {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.select-list li .right {
|
||||
float: right;
|
||||
}
|
||||
li {
|
||||
padding: 10px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.select-list .key-binding {
|
||||
border-radius: 2px;
|
||||
margin-left: 5px;
|
||||
padding: 3px;
|
||||
font-size: 11px;
|
||||
}
|
||||
li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.select-list ol li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
li.active-item {
|
||||
.mini-icon(confirm, 14px);
|
||||
|
||||
.select-list .error {
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
text-shadow: 0 1px 0 #4E0000;
|
||||
}
|
||||
&:before {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.select-list li.active-item:before {
|
||||
font-family: 'Octicons Regular';
|
||||
font-size: 14px;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
margin-right: 5px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
color: #9d9d9d;
|
||||
content: '\f03a';
|
||||
}
|
||||
li.inactive-item {
|
||||
padding-left: 29px;
|
||||
}
|
||||
|
||||
.select-list li.inactive-item {
|
||||
padding-left: 29px;
|
||||
li .right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.key-binding {
|
||||
border-radius: 2px;
|
||||
margin-left: 5px;
|
||||
padding: 3px;
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@import "bootstrap/less/mixins.less";
|
||||
|
||||
html, body,
|
||||
#root-view {
|
||||
font: caption;
|
||||
@@ -23,4 +25,9 @@ html, body,
|
||||
|
||||
.wrap-guide {
|
||||
background: rgba(150, 150, 150, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
.btn-pseudo-states(#19191a, #1a1b1c);
|
||||
color: #969696;
|
||||
}
|
||||
|
||||
@@ -1,48 +1,60 @@
|
||||
.select-list ol li {
|
||||
background-color: #27292b;
|
||||
border-bottom: 1px solid #1e1e1e;
|
||||
}
|
||||
.select-list {
|
||||
.error {
|
||||
color: white;
|
||||
text-shadow: 0 1px 0 #4E0000;
|
||||
}
|
||||
|
||||
.select-list li .label {
|
||||
color: #bbb;
|
||||
}
|
||||
ol {
|
||||
border: 1px solid #212121;
|
||||
|
||||
.select-list .key-binding {
|
||||
background: -webkit-linear-gradient(
|
||||
rgba(100, 100, 100, 0.5),
|
||||
rgba(70,70,70, 0.5));
|
||||
color: #ccc;
|
||||
-webkit-box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.1);
|
||||
display: inline-block;
|
||||
line-height: 100%;
|
||||
}
|
||||
li {
|
||||
background-color: #27292b;
|
||||
border-bottom: 1px solid #1e1e1e;
|
||||
color: #bbb;
|
||||
}
|
||||
|
||||
.select-list li:hover .label {
|
||||
color: #fff;
|
||||
}
|
||||
.key-binding {
|
||||
background: -webkit-linear-gradient(
|
||||
rgba(100, 100, 100, 0.5),
|
||||
rgba(70,70,70, 0.5));
|
||||
color: #ccc;
|
||||
-webkit-box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.1);
|
||||
display: inline-block;
|
||||
line-height: 100%;
|
||||
}
|
||||
|
||||
.select-list ol .selected {
|
||||
background-image: -webkit-linear-gradient(#7e7e7e, #737373);
|
||||
}
|
||||
li.active-item:before {
|
||||
color: #9d9d9d;
|
||||
}
|
||||
|
||||
.select-list .right,
|
||||
.select-list .directory {
|
||||
color: #777;
|
||||
}
|
||||
li:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.select-list ol .selected .label {
|
||||
color: #fff;
|
||||
}
|
||||
.selected {
|
||||
background-image: -webkit-linear-gradient(#7e7e7e, #737373);
|
||||
}
|
||||
|
||||
.select-list ol .selected .right,
|
||||
.select-list ol .selected .directory {
|
||||
color: #ccc;
|
||||
}
|
||||
.right,
|
||||
.directory {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.select-list .modified {
|
||||
color: #f78a46;
|
||||
}
|
||||
.selected {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.select-list .new {
|
||||
color: #5293d8;
|
||||
.selected .right,
|
||||
.selected .directory {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.modified {
|
||||
color: #f78a46;
|
||||
}
|
||||
|
||||
.new {
|
||||
color: #5293d8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@import "bootstrap/less/mixins.less";
|
||||
|
||||
html, body,
|
||||
#root-view {
|
||||
font: caption;
|
||||
@@ -23,4 +25,14 @@ html, body,
|
||||
|
||||
.wrap-guide {
|
||||
background: rgba(150, 150, 150, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
.btn-pseudo-states(#cbcbcb, #b3b3b3);
|
||||
color: #444;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: #222;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,39 +3,48 @@
|
||||
border: 1px solid #c6c6c6;
|
||||
color: #323232;
|
||||
box-shadow: 0 0 10px #555;
|
||||
}
|
||||
|
||||
.select-list ol {
|
||||
border: 1px solid #d2d2d2;
|
||||
}
|
||||
.error {
|
||||
color: white;
|
||||
text-shadow: 0 1px 0 #4E0000;
|
||||
}
|
||||
|
||||
.select-list ol li {
|
||||
background-color: #f5f5f5;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
ol {
|
||||
border: 1px solid #d2d2d2;
|
||||
|
||||
.select-list li:hover {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
li {
|
||||
background-color: #f5f5f5;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.select-list ol .selected {
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
li:hover {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
.select-list .right,
|
||||
.select-list .directory {
|
||||
color: #777;
|
||||
}
|
||||
li.active-item:before {
|
||||
color: #9d9d9d;
|
||||
}
|
||||
|
||||
.select-list ol .selected .right,
|
||||
.select-list ol .selected .directory {
|
||||
color: #333;
|
||||
}
|
||||
.selected {
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
|
||||
.select-list .modified {
|
||||
color: #f78a46;
|
||||
}
|
||||
.selected .right,
|
||||
.selected .directory {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.select-list .new {
|
||||
color: #5293d8;
|
||||
.right,
|
||||
.directory {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.modified {
|
||||
color: #f78a46;
|
||||
}
|
||||
|
||||
.new {
|
||||
color: #5293d8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1
vendor/bootstrap
vendored
Submodule
1
vendor/bootstrap
vendored
Submodule
Submodule vendor/bootstrap added at 991a353a26
5078
vendor/less.js
vendored
5078
vendor/less.js
vendored
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user