cancel button css + item module refactor

This commit is contained in:
Carlos Jimenez Ruiz 2020-12-15 16:07:34 +01:00
parent 8e13fa7852
commit 1ba83e7741
8 changed files with 52 additions and 12 deletions

View File

@ -76,6 +76,13 @@
&:hover, &:hover,
&:focus { &:focus {
outline: none; outline: none;
&.cancel {
&:hover,
&:focus {
background-color: transparent;
}
}
} }
&.round { &.round {
border-radius: 50%; border-radius: 50%;
@ -106,4 +113,14 @@
opacity: .7; opacity: .7;
cursor: initial; cursor: initial;
} }
&.cancel {
color: $color-button;
background-color: transparent;
box-shadow: none;
&:not(.disabled) {
&:hover {
color: lighten($color-button, 10%);
}
}
}
} }

View File

@ -43,8 +43,15 @@
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit <vn-submit
ng-if="watcher.dataChanged()" disabled="!watcher.dataChanged()"
label="Save"> label="Save">
</vn-submit> </vn-submit>
<!-- # #2680 Undo changes button bugs -->
<!-- <vn-button
class="cancel"
label="Undo changes"
disabled="!watcher.dataChanged()"
ng-click="watcher.loadOriginalData()">
</vn-button> -->
</vn-button-bar> </vn-button-bar>
</form> </form>

View File

@ -159,10 +159,15 @@
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit <vn-submit
ng-if="watcher.dataChanged()" disabled="!watcher.dataChanged()"
label="Save"> label="Save">
</vn-submit> </vn-submit>
<vn-button label="Undo changes" ng-if="$ctrl.$scope.form.$dirty" ng-click="watcher.loadOriginalData()"></vn-button> <vn-button
class="cancel"
label="Undo changes"
disabled="!watcher.dataChanged()"
ng-click="watcher.loadOriginalData()">
</vn-button>
</vn-button-bar> </vn-button-bar>
</form> </form>

View File

@ -46,13 +46,15 @@
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit <vn-submit
ng-if="watcher.dataChanged()" disabled="!watcher.dataChanged()"
label="Save"> label="Save">
</vn-submit> </vn-submit>
<vn-button <!-- # #2680 Undo changes button bugs -->
ng-if="watcher.dataChanged()" <!-- <vn-button
class="cancel"
label="Undo changes" label="Undo changes"
disabled="!watcher.dataChanged()"
ng-click="watcher.loadOriginalData()"> ng-click="watcher.loadOriginalData()">
</vn-button> </vn-button> -->
</vn-button-bar> </vn-button-bar>
</form> </form>

View File

@ -61,10 +61,11 @@
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit <vn-submit
ng-if="watcher.dataChanged()" disabled="!watcher.dataChanged()"
label="Create"> label="Create">
</vn-submit> </vn-submit>
<vn-button <vn-button
class="cancel"
label="Cancel" label="Cancel"
ui-sref="item.index"> ui-sref="item.index">
</vn-button> </vn-button>

View File

@ -58,8 +58,15 @@
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit <vn-submit
ng-if="watcher.dataChanged()" disabled="!watcher.dataChanged()"
label="Save"> label="Save">
</vn-submit> </vn-submit>
<!-- # #2680 Undo changes button bugs -->
<!-- <vn-button
class="cancel"
label="Undo changes"
disabled="!watcher.dataChanged()"
ng-click="watcher.loadOriginalData()">
</vn-button> -->
</vn-button-bar> </vn-button-bar>
</form> </form>

View File

@ -74,7 +74,7 @@
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit <vn-submit
ng-if="watcher.dataChanged()" disabled="!watcher.dataChanged()"
label="Save"> label="Save">
</vn-submit> </vn-submit>
</vn-button-bar> </vn-button-bar>

View File

@ -29,13 +29,14 @@
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit <vn-submit
ng-if="watcher.dataChanged()" disabled="!watcher.dataChanged()"
label="Save"> label="Save">
</vn-submit> </vn-submit>
<!-- # #2680 Undo changes button bugs --> <!-- # #2680 Undo changes button bugs -->
<!-- <vn-button <!-- <vn-button
class="cancel"
label="Undo changes" label="Undo changes"
ng-if="watcher.dataChanged()" disabled="!watcher.dataChanged()"
ng-click="watcher.loadOriginalData()"> ng-click="watcher.loadOriginalData()">
</vn-button> --> </vn-button> -->
</vn-button-bar> </vn-button-bar>