diff --git a/plugins/excel-multirow-maillist-parser/LICENCE b/plugins/excel-multirow-maillist-parser/LICENCE index a1640b51c..634a69118 100644 --- a/plugins/excel-multirow-maillist-parser/LICENCE +++ b/plugins/excel-multirow-maillist-parser/LICENCE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2013 RainLoop Team +Copyright (c) 2013 https://github.com/sharq88 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/plugins/excel-multirow-maillist-parser/index.php b/plugins/excel-multirow-maillist-parser/index.php index 713b92e28..456a16337 100644 --- a/plugins/excel-multirow-maillist-parser/index.php +++ b/plugins/excel-multirow-maillist-parser/index.php @@ -9,5 +9,4 @@ class ParseExcelListPlugin extends \RainLoop\Plugins\AbstractPlugin { $this->addJs('js/parse_excel_list.js'); // add js file } - } diff --git a/plugins/excel-multirow-maillist-parser/js/parse_excel_list.js b/plugins/excel-multirow-maillist-parser/js/parse_excel_list.js index e6d6b06f2..9f1f8b976 100644 --- a/plugins/excel-multirow-maillist-parser/js/parse_excel_list.js +++ b/plugins/excel-multirow-maillist-parser/js/parse_excel_list.js @@ -1,18 +1,22 @@ -$(function () { +(function(window, $) { - //selectors - var inputs = '.popups .inputosaurus-input input[type="text"]:first, \ - .popups .cc-row input[type="text"]:first, \ - .popups .bcc-row input[type="text"]:first'; + $(function() { + + $(window.document).on('keyup', '.b-compose .b-header .inputosaurus-input input[type="text"]:first', function() { + + var + $this = $(this), + value = $this.val() + ; + + if (value && value.match(/@/ig).length >= 2) + { + $this.val($this.val().replace(/\n| /ig, ',')); + } + + }); - //bind function - $(document).on( 'keyup', inputs, function(){ - var t = $(this); - var v = t.val(); - if( v != "" && v.match(/@/ig).length >= 2 ){ - t.val( t.val().replace(/\n| /ig,",") ) - } }); -}); \ No newline at end of file +}(window, $)) \ No newline at end of file