-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from rwth-acis/reqbaz-dev
Reqbaz dev Merge
- Loading branch information
Showing
2,849 changed files
with
3,240 additions
and
351,930 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ bower_components | |
.idea/workspace.xml | ||
.idea/tasks.xml | ||
.idea/dictionaries | ||
components |
Binary file not shown.
Binary file not shown.
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
Binary file not shown.
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,74 @@ | ||
<link rel="import" href="../../components/polymer/polymer.html"> | ||
|
||
<dom-module id="file-gallery"> | ||
<template> | ||
<style is="custom-style"> | ||
#expandedImg { | ||
width: 100%; | ||
} | ||
</style> | ||
|
||
<div> | ||
<template is="dom-repeat" items="{{attachments}}"> | ||
<img style="width:50px; height:50px;" src="[[item.fileUrl]]" on-tap="toggle"> | ||
</template> | ||
</div> | ||
|
||
<template is="dom-if" if="{{!grid}}"> | ||
<iron-collapse id="collapseImg"> | ||
<img id="expandedImg" on-tap="toggle"> | ||
</iron-collapse> | ||
</template> | ||
|
||
<template is="dom-if" if="{{grid}}"> | ||
<paper-dialog id="imgPopup"> | ||
<paper-dialog-scrollable> | ||
<img id="popupImg"> | ||
</paper-dialog-scrollable> | ||
</paper-dialog> | ||
</template> | ||
|
||
</template> | ||
|
||
<script> | ||
(function () { | ||
// 'use strict'; | ||
|
||
Polymer({ | ||
is: 'file-gallery', | ||
properties: { | ||
attachments: { | ||
type: Array, | ||
notify: true | ||
}, | ||
grid: { | ||
type: Boolean, | ||
value: false, | ||
notify: true | ||
} | ||
}, | ||
|
||
toggle: function(e){ | ||
if (this.grid){ | ||
document.getElementById("popupImg").src = e.currentTarget.src; | ||
document.getElementById("imgPopup").open(); | ||
} else { | ||
if (!document.getElementById("collapseImg").opened){ | ||
document.getElementById("expandedImg").src = e.currentTarget.src; | ||
document.getElementById("collapseImg").show(); | ||
} else { | ||
if (document.getElementById("expandedImg").src === e.currentTarget.src){ | ||
document.getElementById("collapseImg").toggle(); | ||
} else { | ||
document.getElementById("expandedImg").src = e.currentTarget.src; | ||
} | ||
} | ||
} | ||
} | ||
|
||
}); | ||
}) | ||
(); | ||
</script> | ||
|
||
</dom-module> |
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
Oops, something went wrong.