Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.0 #6

Merged
merged 22 commits into from
Jan 8, 2017
Merged
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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.svn
.DS_Store
vendor/
node_modules/
dist/
10 changes: 10 additions & 0 deletions .svnignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.git
.gitignore
.travis.yml
tests
bin
node_modules
package.json
phpunit.xml.dist
composer.json
composer.lock
34 changes: 34 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
language: php
notifications:
email:
on_success: never
on_failure: change
branches:
only:
- master
- "/^v[0-9\\.]+$/"
php:
- 5.6
- 7.0
env:
matrix:
- WP_VERSION=latest WP_MULTISITE=0
- WP_VERSION=4.4 WP_MULTISITE=0
global:
- SVN_REPO: https://plugins.svn.wordpress.org/never-let-me-go/
- secure: "HM/WQwdBmnmvHJ+60V7zwHEa1kpcLY0vHzWMJWhJwA89JjIm+YFJL1XRZUxgooVKK/L0zBSMxrmy7oG2KtqGIcoXH2NYnbrQHUblbw9xIejfkowBC4QMcCXmYlVUmR1zc42XUFzn7Dd8YkGyqoSHYa4AvQrLu35b4yt8m6L5JP0="
matrix:
include:
- php: 5.6
env: WP_VERSION=4.6 WP_MULTISITE=0 WP_PULUGIN_DEPLOY=1
before_script:
- composer install
- curl -s -o $HOME/.nvm/nvm.sh https://raw.githubusercontent.com/creationix/nvm/v0.31.0/nvm.sh
- source $HOME/.nvm/nvm.sh
- nvm install v4.4.2
- node --version
- npm install && npm start
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
script:
- phpunit
after_success: curl -L https://raw.githubusercontent.com/miya0001/travis2wpplugin/master/deploy.sh | bash
16 changes: 16 additions & 0 deletions assets/.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"strict" : true,
"indent" : 2,
"unused" : false,
"undef" : true,
"browser" : true,
"devel" : false,
"debug" : true,
"jquery": true,
"globals": {
"GianSays": false,
"Cookies": false,
"Gianalytics": false,
"GianismBot": false
}
}
20 changes: 0 additions & 20 deletions assets/config.rb

This file was deleted.

28 changes: 0 additions & 28 deletions assets/css/admin.css

This file was deleted.

1 change: 0 additions & 1 deletion assets/css/shCore.css

This file was deleted.

1 change: 0 additions & 1 deletion assets/css/shThemeDefault.css

This file was deleted.

Binary file added assets/img/icon-nlmg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
90 changes: 24 additions & 66 deletions assets/js/onload.js
Original file line number Diff line number Diff line change
@@ -1,67 +1,25 @@
jQuery(document).ready(function($){
SyntaxHighlighter.all();

var incSearch = {
currentChar: '',
timer: null,
onloading: false,
setUserId: function(e){
e.preventDefault();
$('#nlmg_assign_to').val($(this).attr('href').replace(/[^0-9]/, ''));
},

fire: function(){
incSearch.onloading = true;
$('.inc-search-container .loader').removeClass('toggle');
$.post(NLMG.endpoint, {
action: NLMG.action,
query: incSearch.currentChar
}, incSearch.result);
},

result: function(response){
incSearch.onloading = false;
incSearch.timer = null;
$('.inc-search-container .loader').addClass('toggle');
//Empty container
var container = $('#user-inc-search-result');
container.empty().css({
display: 'block'
});
if(response.total > 0){
container.append('<li class="no-result">' + NLMG.found.replace(/%%/, response.total) + '</li>');
for(i = 0, l = response.results.length; i < l; i++){
container.prepend('<a href="#' + response.results[i].ID + '">' + response.results[i].display_name + '</a>');
}
container.find('a').click(incSearch.setUserId).fadeIn();
}else{
container.append('<li class="no-result">' + NLMG.noResults + '</li>').fadeIn('fast', function(){
setTimeout(function(){
container.fadeOut();
}, 2000);
});
}
},

clearResults: function(e){
$(this).val('');
$('#user-inc-search-result').fadeOut('fast', function(){
$(this).css('display', 'none');
});
}
};

$('#user-inc-search').keyup(function(e){
incSearch.currentChar = $(this).val();
if(incSearch.currentChar.length > 2 && !incSearch.onloading){
if(incSearch.timer){
//Timer exists, reset
clearTimeout(incSearch.timer);
}
//Enqueue AJAX search
incSearch.timer = setTimeout(incSearch.fire, 500);
}
});

$('#user-inc-search').blur(incSearch.clearResults);
/*global NLMG:false*/

jQuery(document).ready(function ($) {

"use strict";

// Incremental search
var $input = $('#nlmg_assign_to');
$input.autocomplete({
minLength: 1,
source : NLMG.endpoint,
focus : function (event, ui) {
return false;
},
select : function (event, ui) {
jQuery(this).val(ui.item.ID);
return false;
}
})
.autocomplete("instance")._renderItem = function (ul, item) {
return jQuery("<li>")
.append("<div class='nlmg-inc-search'>" + item.avatar + "<span class=\"nlmg-inc-name\">" + item.display_name + "<small>(" + item.user_login + ")</small></span><div style=\"clear:left\"></div></div>")
.appendTo(ul);
};
});
1 change: 0 additions & 1 deletion assets/js/onload.min.js

This file was deleted.

88 changes: 0 additions & 88 deletions assets/js/shBrushPhp.js

This file was deleted.

Loading