src_js/iconolab-bundle/src/components/collectionselector/CollectionSelector.vue
author ymh <ymh.work@gmail.com>
Wed, 18 Jul 2018 18:17:01 +0200
changeset 572 423316923527
parent 263 ab794183f134
permissions -rw-r--r--
Correct tag list removal
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
212
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
     1
<script>
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
     2
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
     3
export default {
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
     4
	data () {
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
     5
		return {}
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
     6
	},
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
     7
	mounted () {
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
     8
		var self=this;
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
     9
		$(".collection-container").hide();
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    10
		$(".collection-description-complete").hide();
263
ab794183f134 Reworked home so collection images are presented when we first enter the site #54
durandn
parents: 212
diff changeset
    11
	    $("#show-main-collections").hide();
212
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    12
	},
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    13
	methods: {
263
ab794183f134 Reworked home so collection images are presented when we first enter the site #54
durandn
parents: 212
diff changeset
    14
	 	pickOtherCollection: function(name){
212
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    15
		    if (!$("#show-collection-"+name).hasClass("btn-primary")){
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    16
			    $("#main-panel").hide();
263
ab794183f134 Reworked home so collection images are presented when we first enter the site #54
durandn
parents: 212
diff changeset
    17
			    $("#show-main-collections").show();
212
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    18
	     	    $(".collection-container").removeClass("selected");
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    19
	     	    $(".collection-container:not(.selected)").hide();
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    20
			    $(".collection-description-complete").hide()
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    21
			    $(".collection-description").show()
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    22
	     	    $(".btn-collection").removeClass("btn-primary")
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    23
	     	    $("#show-collection-"+name).addClass("btn-primary")
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    24
	     	    $(".collection-container#collection-panel-"+name).show()
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    25
	     	    $(".collection-container#collection-panel-"+name).addClass("selected")
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    26
		    }
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    27
		},
263
ab794183f134 Reworked home so collection images are presented when we first enter the site #54
durandn
parents: 212
diff changeset
    28
		showMainPanel: function(){
ab794183f134 Reworked home so collection images are presented when we first enter the site #54
durandn
parents: 212
diff changeset
    29
     	    $(".collection-container").removeClass("selected");
ab794183f134 Reworked home so collection images are presented when we first enter the site #54
durandn
parents: 212
diff changeset
    30
     	    $(".btn-collection").removeClass("btn-primary")
ab794183f134 Reworked home so collection images are presented when we first enter the site #54
durandn
parents: 212
diff changeset
    31
     	    $(".collection-container").hide();
ab794183f134 Reworked home so collection images are presented when we first enter the site #54
durandn
parents: 212
diff changeset
    32
		    $("#main-panel").show();
ab794183f134 Reworked home so collection images are presented when we first enter the site #54
durandn
parents: 212
diff changeset
    33
		    $("#show-main-collections").hide();
ab794183f134 Reworked home so collection images are presented when we first enter the site #54
durandn
parents: 212
diff changeset
    34
		},
212
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    35
		showCompleteDescription: function(name){
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    36
		    $(".collection-description-complete").hide()
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    37
		    $("#collection-description-short-"+name).hide()
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    38
		    $("#collection-description-complete-"+name).show()
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    39
		},
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    40
		hideCompleteDescription: function(name){
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    41
		    $(".collection-description-complete").hide()
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    42
		    $("#collection-description-short-"+name).show()
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    43
		}
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    44
	}
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    45
}
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    46
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    47
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    48
</script>