mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-01-18 01:27:25 +01:00
Refactor content editor - More basic styling on import/export.
This commit is contained in:
@@ -127,6 +127,7 @@ var ATEditor = (function(ATEditor, model, importExport, exampleData) {
|
||||
var val = parseInt(obj.baseMarketCost);
|
||||
if (obj.hasManualPrice === "0") {
|
||||
val = calculateItemCost(obj);
|
||||
if (val <= 0) { val = 1; }
|
||||
obj.baseMarketCost = val;
|
||||
}
|
||||
$scope.marketCost_Sell = Math.round(val * (100 + 15) / 100);
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
<div id="dialog-export">
|
||||
<div id="description" class="importexport-description">This data corresponds to the files named res/values/content_*.xml in the source code.</div>
|
||||
<h3>Export</h3>
|
||||
<fieldset>
|
||||
Export
|
||||
<select ng-model="selectedSection" ng-options="s.name for s in sections">
|
||||
</select>
|
||||
|
||||
<button ng-click="exportData()">Export</button>
|
||||
<button ng-click="exportData()" class="btn btn-primary"><i class="icon-download"></i> Export</button>
|
||||
|
||||
<div ng-ds-fade="content"><textarea id="value" rows="9" cols="80" ng-model="content"></textarea></div>
|
||||
<p> </p>
|
||||
|
||||
<div ng-ds-fade="content">
|
||||
<textarea id="importExportTextArea" rows="9" cols="80" ng-model="content"></textarea>
|
||||
<br /><br />
|
||||
<p>Exported data should be placed in the files named <a href="http://code.google.com/p/andors-trail/source/browse/#git%2FAndorsTrail%2Fres">res/raw/*.json</a> in the source code.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
<div id="dialog-import">
|
||||
<div id="description" class="importexport-description">This data corresponds to the files named res/values/content_*.xml in the source code.</div>
|
||||
<h3>Import</h3>
|
||||
<fieldset>
|
||||
<p>Data to import can be found in the files named <a href="http://code.google.com/p/andors-trail/source/browse/#git%2FAndorsTrail%2Fres">res/raw/*.json</a> in the source code.</p>
|
||||
Import as
|
||||
<select ng-model="selectedSection" ng-options="s.name for s in sections">
|
||||
</select>
|
||||
|
||||
<div><textarea id="value" rows="9" cols="80" ng-model="content"></textarea></div>
|
||||
<button ng-click="importData()">Import</button>
|
||||
<p>
|
||||
<textarea id="importExportTextArea" rows="9" cols="80" ng-model="content" placeholder="paste json data here"></textarea>
|
||||
</p>
|
||||
<button ng-click="importData()" class="btn btn-primary pull-right"><i class="icon-upload"></i> Import</button>
|
||||
|
||||
<div style="color: red;" ng-ds-fade="errorMsg">{{errorMsg}}</div>
|
||||
<div style="color: green;" ng-ds-fade="importedMsg">{{importedMsg}}</div>
|
||||
|
||||
@@ -6,7 +6,6 @@ html, body { margin:0; padding:0; }
|
||||
#top #buttons { float: right; font-size: 1.2em; margin: 10px; }
|
||||
.workarea { margin: 5px; position: absolute; top: 54px; }
|
||||
#left { width: 250px; padding: 0px; font-size: 1em; }
|
||||
#left .accordion-group { background-color: #e0e0e0; border: 1px solid #bbb; margin-bottom: 6px; -moz-box-shadow: 4px 4px 5px #bbb; -webkit-box-shadow: 4px 4px 5px #bbb; box-shadow: 4px 4px 5px #bbb; }
|
||||
#center { left: 265px; right: 0; border-left: 2px #c0d0ff solid; padding-left: 5px; }
|
||||
|
||||
.hidden { display: none; }
|
||||
@@ -20,29 +19,28 @@ html, body { margin:0; padding:0; }
|
||||
.workarea h3 { font-size: 18px; margin: 0 0 0 5px; }
|
||||
.workarea legend { font-size: 16px; margin: 0 0 5px 0; }
|
||||
.workarea fieldset { float:left; margin: 1ex; border-right: 1px solid #ddd; padding-right: 5px; }
|
||||
.workarea .endSets { clear: both; }
|
||||
|
||||
.fieldWithLabel { font-size: 0.9em; }
|
||||
.fieldWithLabel label { margin-top: 1.1ex; }
|
||||
.endSets { clear: both; }
|
||||
|
||||
#left .accordion-group { background-color: #e0e0e0; border: 1px solid #bbb; margin-bottom: 6px; -moz-box-shadow: 4px 4px 5px #bbb; -webkit-box-shadow: 4px 4px 5px #bbb; box-shadow: 4px 4px 5px #bbb; }
|
||||
.itemlist { list-style: none; padding: 0px; margin: 0px; border: 1px solid #bbb; }
|
||||
.itemlist li { padding: 2px 5px 2px 5px; }
|
||||
.itemlist li img { float: left; margin-right: 0.5ex; }
|
||||
.itemlist li:nth-child(odd) { background-color: #eee; }
|
||||
.itemlist li:hover { background-color: #d7d7ff; cursor: pointer; }
|
||||
.importexport-header { font-weight: bold; padding-top: 1ex; }
|
||||
#dialog-importexport #value { font-family: monospace; font-size: 7pt; }
|
||||
|
||||
.fieldWithLabel label { margin-top: 1.1ex; }
|
||||
.fieldWithLabel table { border-collapse: collapse; margin-bottom: 1ex; }
|
||||
.fieldWithLabel table th { border: 1px #ccc solid; padding: 0.5ex; }
|
||||
.fieldWithLabel table td { border: 1px #ccc solid; padding: 0.5ex; }
|
||||
.fieldWithLabel table tbody tr:nth-child(even) { background-color: #eee }
|
||||
.fieldWithLabel table tbody tr:hover { background-color: #d7d7ff; }
|
||||
|
||||
#dialogueTreeContainer { }
|
||||
#dialogueTree { width: 400px; }
|
||||
#dialogueData { }
|
||||
.imageButton { padding: 5px; }
|
||||
.importexport-description { padding: 15px; text-align: right; }
|
||||
.tools-buttons { padding-bottom: 10px; }
|
||||
#importExportTextArea { width: 500px; }
|
||||
|
||||
.validateStep { border: 1px #d7d7ff solid; background-color: white; padding: 1em; margin: 2em; float: left; }
|
||||
.validateStep h1 { font-size: 1.1em; }
|
||||
|
||||
Reference in New Issue
Block a user