Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/contents/less/embed-containers.less
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@

@import "priEmbeds/twitterEmbed.less";

@import "priEmbeds/slideshow.less";
@import "priEmbeds/slideshow.less";

@import "priEmbeds/opinaryEmbed.less";
4 changes: 4 additions & 0 deletions src/contents/less/priEmbeds/opinaryEmbed.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.opinary-widget
{
background-color: @body-bg;
}
4 changes: 3 additions & 1 deletion src/contents/less/priEmbeds/priEntityEmbeds.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@

@import "twitterEmbed.less";

@import "slideshow.less";
@import "slideshow.less";

@import "opinaryEmbed.less";
12 changes: 12 additions & 0 deletions src/contents/less/social_editor.less
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@

.social_editor-preview_inner
{
position: relative;

> * {
& + * {
margin-left: 20px;
Expand Down Expand Up @@ -152,4 +154,14 @@
color: @btn-primary-color;
text-decoration: none;
}
}

.social_editor-blocker
{
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
}
54 changes: 54 additions & 0 deletions src/html/modal/modal_opinary.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<form>
<div class="embed-modal-row">
<div class="embed-modal-full-column">
<div class="embed-modal-form">
<label class="embed-modal-label" for="title">Title</label>
<input name="title" type="text" placeholder="Enter a title" class="embed-modal-form-control" />
</div>
</div>
</div>

<div class="embed-modal-row">
<div class="embed-modal-full-column">
<div class="embed-modal-form">
<label class="embed-modal-label" for="url">Source</label>

<div class="social_editor">

<div class="social_editor-intro">
<div class="social_editor-intro_inner">
<div>
<div class="input-group">
<input name="url" type="url" placeholder="Enter URL, or drop link..." class="embed-modal-input embed-modal-form-control js-input-url" />
<span class="input-group-btn">
<button class="btn btn-primary js-btn-preview" type="button">Preview</button>
</span>
</div>
</div>
</div>
</div>

<div class="social_editor-preview">
<div class="social_editor-preview_inner">
<div class="social_editor-preview_post"></div>
<div class="social_editor-blocker"></div>
</div>
</div>

<div class="social_editor-toolbar">
<ul class="social_editor-toolbar_list">
<li class="social_editor-toolbar_item js-btn-edit">
<a class="social_editor-tollbar_btn"><span class="fa fa-pencil" aria-label="Enter Another URL"></span></a>
</li>
<li class="social_editor-toolbar_item js-btn-cancel">
<a class="social_editor-tollbar_btn"><span class="fa fa-arrow-left" aria-label="Cancel URL Editing"></span></a>
</li>
</ul>
</div>

</div>

</div>
</div>
</div>
</form>
88 changes: 44 additions & 44 deletions src/html/modal/modal_twitter.html
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
<form>
<div class="embed-modal-row">
<div class="embed-modal-full-column">
<div class="embed-modal-form">
<label class="embed-modal-label" for="title">Title</label>
<input name="title" type="text" placeholder="Enter a title" class="embed-modal-input embed-modal-form-control js-input-title" />
</div>
</div>
</div>
<div class="embed-modal-row">
<div class="embed-modal-full-column">
<div class="embed-modal-form">
<label class="embed-modal-label" for="url">Twitter Status (Tweet)</label>
<div class="embed-modal-row">
<div class="embed-modal-full-column">
<div class="embed-modal-form">
<label class="embed-modal-label" for="title">Title</label>
<input name="title" type="text" placeholder="Enter a title" class="embed-modal-input embed-modal-form-control js-input-title" />
</div>
</div>
</div>
<div class="embed-modal-row">
<div class="embed-modal-full-column">
<div class="embed-modal-form">
<label class="embed-modal-label" for="url">Twitter Status (Tweet)</label>

<div class="social_editor">
<div class="social_editor">

<div class="social_editor-intro">
<div class="social_editor-intro_inner">
<div>
<div class="input-group">
<input name="url" type="url" placeholder="Enter URL, or drop link..." class="embed-modal-input embed-modal-form-control js-input-url" />
<span class="input-group-btn">
<button class="btn btn-primary js-btn-preview" type="button">Preview</button>
</span>
</div>
</div>
</div>
</div>
<div class="social_editor-intro">
<div class="social_editor-intro_inner">
<div>
<div class="input-group">
<input name="url" type="url" placeholder="Enter URL, or drop link..." class="embed-modal-input embed-modal-form-control js-input-url" />
<span class="input-group-btn">
<button class="btn btn-primary js-btn-preview" type="button">Preview</button>
</span>
</div>
</div>
</div>
</div>

<div class="social_editor-preview">
<div class="social_editor-preview_inner">
<div class="social_editor-preview_post"></div>
</div>
</div>
<div class="social_editor-preview">
<div class="social_editor-preview_inner">
<div class="social_editor-preview_post"></div>
</div>
</div>

<div class="social_editor-toolbar">
<ul class="social_editor-toolbar_list">
<li class="social_editor-toolbar_item js-btn-edit">
<a class="social_editor-tollbar_btn"><span class="fa fa-pencil" aria-label="Enter Another URL"></span></a>
</li>
<li class="social_editor-toolbar_item js-btn-cancel">
<a class="social_editor-tollbar_btn"><span class="fa fa-arrow-left" aria-label="Cancel URL Editing"></span></a>
</li>
</ul>
</div>
<div class="social_editor-toolbar">
<ul class="social_editor-toolbar_list">
<li class="social_editor-toolbar_item js-btn-edit">
<a class="social_editor-tollbar_btn"><span class="fa fa-pencil" aria-label="Enter Another URL"></span></a>
</li>
<li class="social_editor-toolbar_item js-btn-cancel">
<a class="social_editor-tollbar_btn"><span class="fa fa-arrow-left" aria-label="Cancel URL Editing"></span></a>
</li>
</ul>
</div>

</div>
</div>

</div>
</div>
</div>
</div>
</div>
</div>
</form>
2 changes: 1 addition & 1 deletion src/js/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ $(document).ready(function(){
domainName: 'https://test-services.pri.org', // it is configured in the entity embed addon, but this is
modalOptions: {
addOnly: true,
embedTypeStr: ['image', 'audio', 'slideshow']
embedTypeStr: ['image', 'audio', 'slideshow', 'opinary']
}
}) // a good example that configuration can be done like so
.done(function(scope){
Expand Down
3 changes: 2 additions & 1 deletion src/js/embedModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ var EntityEmbed = EntityEmbed || {};
externalLink:{},
newsletterSubscribe:{},
iframe:{},
customText:{}
customText:{},
opinary:{}
}
};
var embedTypes = [];
Expand Down
2 changes: 1 addition & 1 deletion src/js/embeds/facebookEmbed.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ var EntityEmbed = EntityEmbed || {};
}
else
{
// Get Video embeds that have matching URL
// Get Facebook embeds that have matching URL
EntityEmbed.apiService.get({
path: self.options.httpPaths.getAll,
data: {
Expand Down
4 changes: 2 additions & 2 deletions src/js/embeds/instagramEmbed.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ var EntityEmbed = EntityEmbed || {};
$.validator.addMethod('validInstagramUrl', function(value, element, params) {
var isValid = isValidUrl(value);
return this.optional(element) || isValid;
}, 'The URL must be to a valid Facebook post or video.');
}, 'The URL must be to a valid Instagram post.');

$ui.previewBtn.on('click', function(evt) {

Expand Down Expand Up @@ -320,7 +320,7 @@ var EntityEmbed = EntityEmbed || {};
}
else
{
// Get Video embeds that have matching URL
// Get Instagram embeds that have matching URL
EntityEmbed.apiService.get({
path: self.options.httpPaths.getAll,
data: {
Expand Down
Loading