-
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 pull request #142 from deanblackborough/image-tool
Image tool
- Loading branch information
Showing
27 changed files
with
1,182 additions
and
1,405 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
13 changes: 6 additions & 7 deletions
13
application/modules/content/views/scripts/ajax/image-picker-categories.phtml
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 |
---|---|---|
@@ -1,14 +1,13 @@ | ||
<script> | ||
dlayer.fn.imagePicker.setCategory(); | ||
dlayerDesigner.imagePicker.setSelectedCategory(); | ||
</script> | ||
|
||
<div class="form-group ip-category"> | ||
<label for="ip-category" class="required">Category</label> | ||
<select name="ip-category" id="ip-category" class="form-control input-sm"> | ||
<div class="form-group"> | ||
<label for="category-selector" class="required">Category</label> | ||
<select name="category-selector" class="form-control input-sm category-selector"> | ||
<?php foreach($this->categories as $id=>$label) { ?> | ||
<option value="<?php echo $this->escape($id); ?>"><?php echo $this->escape($label); ?></option> | ||
<?php } ?> | ||
</select> | ||
<p class="help-block">Select a category from your Image | ||
library to show sub categories.</p> | ||
</div> | ||
<p class="help-block">Select a category from your Image library to show sub categories.</p> | ||
</div> |
7 changes: 3 additions & 4 deletions
7
application/modules/content/views/scripts/ajax/image-picker-category.phtml
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 |
---|---|---|
@@ -1,9 +1,8 @@ | ||
<script> | ||
dlayer.fn.imagePicker.clearCategory(); | ||
dlayerDesigner.imagePicker.clearSelectedCategory(); | ||
</script> | ||
|
||
<h4>Category: <small title="<?php echo $this->escape($this->category['number_of_images']); ?> images in category"><?php echo $this->escape($this->category['name']); ?> <span class="badge"><?php echo $this->escape($this->category['number_of_images']); ?></span></small> | ||
<span class="glyphicon glyphicon-remove pull-right clear-image-picker-value clear-image-picker-category" | ||
title="Clear category" aria-hidden="true"></span></h4> | ||
<span class="glyphicon glyphicon-remove pull-right close-icon clear-selected-category" title="Clear category" aria-hidden="true"></span></h4> | ||
|
||
<hr /> | ||
<hr /> |
118 changes: 55 additions & 63 deletions
118
application/modules/content/views/scripts/ajax/image-picker-images.phtml
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 |
---|---|---|
@@ -1,71 +1,63 @@ | ||
<script> | ||
dlayer.fn.imagePicker.setImage(); | ||
dlayer.fn.imagePicker.selectImage(); | ||
dlayerDesigner.imagePicker.setSelectedImage(); | ||
dlayerDesigner.imagePicker.selectImage(); | ||
</script> | ||
|
||
<div class="image-list"> | ||
<h4>Images <small>Images for the selected category and | ||
sub category</small></h4> | ||
|
||
<p>You can either select the latest version of an imaage or click the | ||
'view versions' button to choose a specific version.</p> | ||
|
||
<!--<div class="row" style="padding-bottom: 10px;"> | ||
<div class="col-xs-12"> | ||
<div class="btn-toolbar"> | ||
<div class="btn-group btn-group-xs" role="group" aria-label="..."> | ||
<a title="Sorted by name" href="#" class="btn btn-primary">Name</a> | ||
<a title="Sort by size" href="#" class="btn btn-default">Size</a> | ||
<a title="Sort by date uploaded to library" href="#" class="btn btn-default">Uploaded</a> | ||
</div> | ||
<div class="btn-group btn-group-xs" role="group" aria-label="..."> | ||
<a title="Display in ascending order" href="#" class="btn btn-default">Asc.</a> | ||
<a title="Displayed in descending order" href="#" class="btn btn-primary">Desc.</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div>--> | ||
|
||
<?php foreach($this->images as $image) { ?> | ||
|
||
<?php $src = $this->escape($image['image_id'] . | ||
'/' . $image['version_id'] . $image['extension']); ?> | ||
<?php $dimensions = $this->escape($image['width'] . ' x ' . | ||
$image['height'] . ' pixels'); ?> | ||
<?php $select_id = $this->escape('ip-image-' . $image['image_id'] . ':' . | ||
$image['version_id']); ?> | ||
<?php $set_id = $this->escape('ip-set-image-' . $image['image_id']); ?> | ||
<h4>Images <small>Images for the selected category and | ||
sub category</small></h4> | ||
|
||
<div class="row" style="padding-bottom: 10px;"> | ||
<div class="col-xs-4"> | ||
<img src="/images/library/<?php echo $src; ?>" | ||
title="<?php echo $this->escape($image['name']); ?>" | ||
alt="Image library image" width="160" height="120" | ||
class="img-thumbnail"> | ||
</div> | ||
<div class="col-xs-8"> | ||
<p> | ||
<strong>Name:</strong> <?php echo $this->escape($image['name']); ?><br /> | ||
<strong>Dimenisons:</strong> <?php echo $dimensions; ?><br /> | ||
<strong>Size:</strong> <?php echo $this->escape($image['size']); ?> | ||
</p> | ||
</div> | ||
<div class="col-xs-12 text-right"> | ||
<!--<div class="row" style="padding-bottom: 10px;"> | ||
<div class="col-xs-12"> | ||
<div class="btn-toolbar"> | ||
<div class="btn-group btn-group-xs" role="group" aria-label="..."> | ||
<button type="button" | ||
class="btn btn-primary ip-select-image" | ||
id="<?php echo $select_id; ?>">Select</button> | ||
<?php if($image['versions'] == 1) { ?> | ||
<button type="button" id="<?php echo $id; ?>" | ||
class="btn btn-default" | ||
disabled="disabled">View versions</button> | ||
<?php } else { ?> | ||
<button type="button" class="btn btn-default ip-image" | ||
id="<?php echo $set_id; ?>">View versions</button> | ||
<?php } ?> | ||
<a title="Sorted by name" href="#" class="btn btn-primary">Name</a> | ||
<a title="Sort by size" href="#" class="btn btn-default">Size</a> | ||
<a title="Sort by date uploaded to library" href="#" class="btn btn-default">Uploaded</a> | ||
</div> | ||
<div class="btn-group btn-group-xs" role="group" aria-label="..."> | ||
<a title="Display in ascending order" href="#" class="btn btn-default">Asc.</a> | ||
<a title="Displayed in descending order" href="#" class="btn btn-primary">Desc.</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div>--> | ||
|
||
<?php foreach($this->images as $image) { ?> | ||
|
||
<?php $src = $this->escape($image['image_id'] . | ||
'/' . $image['version_id'] . $image['extension']); ?> | ||
<?php $dimensions = $this->escape($image['width'] . ' x ' . | ||
$image['height'] . ' pixels'); ?> | ||
<?php $select_id = $this->escape('ip-image-' . $image['image_id'] . ':' . | ||
$image['version_id']); ?> | ||
<?php $set_id = $this->escape('ip-set-image-' . $image['image_id']); ?> | ||
|
||
<div class="row" style="padding-bottom: 10px;"> | ||
<div class="col-xs-6"> | ||
<img src="/images/library/<?php echo $src; ?>" title="<?php echo $this->escape($image['name']); ?>" | ||
alt="Image library image" width="160" height="120" class="img-thumbnail" /> | ||
</div> | ||
<div class="col-xs-6 small"> | ||
<p> | ||
<strong><?php echo $this->escape($image['name']); ?></strong><br /> | ||
- <?php echo $dimensions; ?><br /> | ||
- <?php echo $this->escape($image['size']); ?> | ||
</p> | ||
</div> | ||
<div class="col-xs-12 text-right"> | ||
<div class="btn-group btn-group-xs" role="group" aria-label="..."> | ||
<button type="button" | ||
class="btn btn-primary version-selector" | ||
data-version-id="<?php echo $this->escape($image['version_id']); ?>" data-image-id="<?php echo $this->escape($image['image_id']); ?>">Select</button> | ||
<?php if($image['versions'] == 1) { ?> | ||
<button type="button" id="<?php echo $id; ?>" | ||
class="btn btn-default" | ||
disabled="disabled">View versions</button> | ||
<?php } else { ?> | ||
<button type="button" class="btn btn-default image-selector" data-image-id="<?php echo $this->escape($image['image_id']); ?>">View versions</button> | ||
<?php } ?> | ||
</div> | ||
</div> | ||
<?php } ?> | ||
</div> | ||
</div> | ||
|
||
<?php } ?> |
13 changes: 6 additions & 7 deletions
13
application/modules/content/views/scripts/ajax/image-picker-sub-categories.phtml
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 |
---|---|---|
@@ -1,14 +1,13 @@ | ||
<script> | ||
dlayer.fn.imagePicker.setSubCategory(); | ||
dlayerDesigner.imagePicker.setSelectedSubCategory(); | ||
</script> | ||
|
||
<div class="form-group ip-sub-category"> | ||
<label for="ip-sub-category" class="required">Sub category</label> | ||
<select name="ip-sub-category" id="ip-sub-category" class="form-control input-sm"> | ||
<div class="form-group"> | ||
<label for="sub-category-selector" class="required">Sub category</label> | ||
<select name="sub-category-selector" class="form-control input-sm sub-category-selector"> | ||
<?php foreach($this->sub_categories as $id=>$label) { ?> | ||
<option value="<?php echo $this->escape($id); ?>"><?php echo $this->escape($label); ?></option> | ||
<?php } ?> | ||
</select> | ||
<p class="help-block">Select a sub category to list the images | ||
defined in the selected category and sub category.</p> | ||
</div> | ||
<p class="help-block">Select a sub category to list the images defined in the selected category and sub category.</p> | ||
</div> |
7 changes: 3 additions & 4 deletions
7
application/modules/content/views/scripts/ajax/image-picker-sub-category.phtml
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 |
---|---|---|
@@ -1,9 +1,8 @@ | ||
<script> | ||
dlayer.fn.imagePicker.clearSubCategory(); | ||
dlayerDesigner.imagePicker.clearSelectedSubCategory(); | ||
</script> | ||
|
||
<h4>Sub category: <small title="<?php echo $this->escape($this->sub_category['number_of_images']); ?> images in sub category/categories"><?php echo $this->escape($this->sub_category['name']); ?> <span class="badge"><?php echo $this->escape($this->sub_category['number_of_images']); ?></span></small> | ||
<span class="glyphicon glyphicon-remove clear-image-picker-value clear-image-picker-sub-category pull-right" | ||
title="Clear sub category" aria-hidden="true"></span></h4> | ||
<span class="glyphicon glyphicon-remove clear-selected-sub-category close-icon pull-right" title="Clear sub category" aria-hidden="true"></span></h4> | ||
|
||
<hr /> | ||
<hr /> |
Oops, something went wrong.