forked from emberjs/ember-inspector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Option to view properties as flat list (emberjs#877)
- Loading branch information
Showing
10 changed files
with
226 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,115 @@ | ||
{{yield this}} | ||
<li class="{{if isOverridden 'mixin__property_state_overridden'}} mixin__property js-object-property"> | ||
<!-- Disclosure Triangle --> | ||
{{#if hasDependentKeys}} | ||
<button | ||
class="mixin__cp-toggle {{if showDependentKeys "mixin__cp-toggle--expanded"}}" | ||
{{action "toggleDeps"}}> | ||
{{svg-jar "disclosure-triangle" | ||
title="Toggle dependent keys" | ||
width="9px" height="9px"}} | ||
</button> | ||
{{else}} | ||
<span class="pad"></span> | ||
{{/if}} | ||
|
||
<!-- Property Icon --> | ||
{{#if isService}} | ||
<span class="mixin__property-icon-container" title="Service"> | ||
<span class="mixin__property-icon mixin__property-icon--service"></span> | ||
</span> | ||
{{else if isComputedProperty}} | ||
<span | ||
class="mixin__property-icon-container" | ||
title="{{if model.code model.code 'code not avaliable' }}" | ||
{{action "toggleDeps"}}> | ||
<span class="mixin__property-icon mixin__property-icon--computed"></span> | ||
</span> | ||
{{else}} | ||
<span class="mixin__property-icon-container" title="Property"> | ||
<span class="mixin__property-icon mixin__property-icon--property"></span> | ||
</span> | ||
{{/if}} | ||
|
||
<!-- Property Name --> | ||
<span class="mixin__property-name js-object-property-name"> | ||
{{#if isService}} | ||
<span | ||
title="service" | ||
class="js-property-name-service mixin__property--group"> | ||
{{model.name}} | ||
</span> | ||
{{else}} | ||
{{#if hasDependentKeys}} | ||
<span | ||
title="computed" | ||
class="js-property-name-computed mixin__property--group"> | ||
{{model.name}} | ||
</span> | ||
{{else}} | ||
{{model.name}} | ||
{{/if}} | ||
{{/if}} | ||
</span> | ||
|
||
<span class="mixin__property-value-separator">: </span> | ||
|
||
<!-- Property Value --> | ||
{{#unless isEdit}} | ||
{{#if (and isComputedProperty (not isCalculated))}} | ||
<button | ||
class="mixin__calc-btn js-calculate" | ||
title="compute property" | ||
{{action "calculate" model bubbles=false target=mixin}}> | ||
{{svg-jar "calculate" width="16px" height="16px"}} | ||
</button> | ||
{{else}} | ||
<span | ||
{{action "valueClick" model}} | ||
class="{{model.value.type}} {{if isService "type-service"}} mixin__property-value js-object-property-value"> | ||
{{model.value.inspect}} | ||
</span> | ||
{{/if}} | ||
{{else}} | ||
{{#unless isDate}} | ||
{{property-field | ||
value=txtValue | ||
finished-editing="finishedEditing" | ||
save-property="saveProperty" | ||
propertyComponent=this | ||
class="mixin__property-value-txt js-object-property-value-txt"}} | ||
{{else}} | ||
{{date-property-field | ||
allowInput=true | ||
date=(readonly dateValue) | ||
dateFormat="Y-m-d" | ||
class="mixin__property-value-txt js-object-property-value-date" | ||
onChange=(action "dateSelected") | ||
onClose=(action "finishedEditing")}} | ||
{{/unless}} | ||
{{/unless}} | ||
|
||
<span class="mixin__property-overridden-by">(Overridden by {{model.overridden}})</span> | ||
|
||
<button | ||
class="mixin__send-btn send-to-console js-send-to-console-btn" | ||
title="Send to console" | ||
{{action "sendToConsole" model target=mixin}}> | ||
{{svg-jar "send-with-text" width="20px" height="10px"}} | ||
</button> | ||
</li> | ||
|
||
{{#if showDependentKeys}} | ||
<li class="mixin__property-dependency-list"> | ||
{{svg-jar "dependent-key-connection" width="20px" height="10px"}} | ||
<ul> | ||
{{#each model.dependentKeys as |depKey index|}} | ||
<li class="mixin__property-dependency-item"> | ||
{{svg-jar "dependent-key-bullet" width="9px" height="9px"}} | ||
<span class="mixin__property-dependency-name" data-label="object-property-name"> | ||
{{depKey}} | ||
</span> | ||
</li> | ||
{{/each}} | ||
</ul> | ||
</li> | ||
{{/if}} |
Oops, something went wrong.