-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge from Develop - Show Upload Date (#16)
* Display Upload date * Fix error msg displayed too low * Ability to show upload btn above * Handle old File Types display for existing attachments * CSS for when only Upload Date is displayed without File Types * When showUploadBtnAbove display new row on top of the list * Update documentation * Fix for Upload Date label becoming blue when clicking on File Type dropdown..weird stuff * Upload Date demo * Adjust responsive layout * Remove left border from File type when Upload Date is shown * Fix for upload btn displaying on 2 lines in IE11 * Update bower.json
- Loading branch information
Showing
8 changed files
with
220 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<link rel="import" href="../../moment-element/moment-import.html"> | ||
<script> | ||
window.etoolsFileBehaviors = window.etoolsFileBehaviors || {}; | ||
/** @polymerBehavior etoolsFileBehaviors.DateBehavior */ | ||
etoolsFileBehaviors.DateBehavior = { | ||
|
||
/** | ||
* Format date string to any format supported by momentjs | ||
*/ | ||
prettyDate: function(dateInput, format) { | ||
if (!format) { | ||
format = 'D MMM YYYY'; | ||
} | ||
var date; | ||
if (dateInput instanceof Date) { | ||
date = dateInput; | ||
} else { | ||
date = new Date(dateInput); | ||
} | ||
|
||
if (date.toString() !== 'Invalid Date') { | ||
// using moment.utc() ensures that the date will not be changed no matter timezone the user has set | ||
return moment.utc(date).format(format); | ||
} | ||
|
||
return ''; | ||
} | ||
}; | ||
</script> |
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 |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<link rel="import" href="../../polymer/polymer.html"> | ||
<link rel="import" href="../../iron-flex-layout/iron-flex-layout.html"> | ||
|
||
<dom-module id="additional-columns-displayed-style"> | ||
<template> | ||
<style> | ||
:host([show-upload-btn-above]) .files-wrapper { | ||
order: 2; | ||
} | ||
:host([activate-file-types]) .file-name-wrapper, | ||
:host([show-upload-date]) .file-name-wrapper { | ||
width: calc(100% - 305px); | ||
padding-right: 15px; | ||
box-sizing: border-box; | ||
|
||
} | ||
:host([activate-file-types][show-upload-date]) .file-name-wrapper { | ||
width: calc(100% - 440px); | ||
padding-right: 15px; | ||
box-sizing: border-box; | ||
} | ||
|
||
:host([activate-file-types]) .file-name-wrapper, | ||
:host([show-upload-date]) .file-name-wrapper { | ||
@apply(--layout-horizontal); | ||
@apply(--layout-start-justified); | ||
@apply(--layout-center); | ||
box-sizing: border-box; | ||
min-width: 140px; | ||
min-height: 62px; | ||
|
||
} | ||
:host([activate-file-types]) .selected-file-container { | ||
border-bottom: none; | ||
} | ||
:host([show-upload-date]) .selected-file-container { | ||
border-bottom: none; | ||
} | ||
|
||
:host([activate-file-types]) .file-area, | ||
:host([show-upload-date]) .file-area { | ||
border-bottom: 1px solid var(--etools-file-area-with-type-border-color, rgba(0, 0, 0, 0.12)); | ||
padding: 15px; | ||
@apply(--etools-file-area-with-type); | ||
} | ||
:host([activate-file-types][show-upload-btn-above]) .file-area { | ||
border-bottom: none; | ||
border-top: 1px solid var(--etools-file-area-with-type-border-color, rgba(0, 0, 0, 0.12)); | ||
padding: 15px; | ||
@apply(--etools-file-area-with-type); | ||
} | ||
:host([show-upload-date][show-upload-btn-above]) .file-area { | ||
border-bottom: none; | ||
border-top: 1px solid var(--etools-file-area-with-type-border-color, rgba(0, 0, 0, 0.12)); | ||
padding: 15px; | ||
@apply(--etools-file-area-with-type); | ||
} | ||
:host([show-upload-date]) .type-dropdown { | ||
border-left: none; | ||
} | ||
:host([show-upload-btn-above]) .upload-button { | ||
margin-top: 0px !important; | ||
margin-bottom: 25px !important; | ||
} | ||
.upload-date paper-input-container { | ||
--paper-input-container-label-floating: { | ||
color: var(--secondary-text-color, #737373); | ||
}; | ||
} | ||
.upload-date { | ||
box-sizing: border-box; | ||
float: left; | ||
border-right: 1px solid var(--etools-file-type-underline-color, rgba(0, 0, 0, 0.12)); | ||
padding-right: 15px; | ||
padding-bottom: 8px; | ||
margin-right: 15px; | ||
min-width: 95px; | ||
height: 62px; | ||
} | ||
|
||
</style> | ||
</template> | ||
</dom-module> |
Oops, something went wrong.