Coder Social home page Coder Social logo

customheader's People

Contributors

ajnyga avatar alexandrafo avatar asmecher avatar bsvvi avatar ckamburov avatar ctgraham avatar defstat avatar diegojmacedo avatar germanhb avatar heike-r avatar jirrka avatar jordilacruz avatar josekarvalho avatar kant avatar mhvezina avatar mirkospiroski avatar mpbraendle avatar mtub avatar natewr avatar neffe avatar osmndrmz avatar ppv1979 avatar primoz-svetek avatar redukr avatar stuartayeates avatar tgc avatar tigran54 avatar touhidurabir avatar trungvjm avatar vormia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

customheader's Issues

Editorial Backend Header Content must be valid XHTML.

Hi! I'm trying to add a helper button that checks when we have submissions with more than 2 evaluations, alerts how many and paints their background, but I'm getting the following error when saving: Editorial Backend Header Content must be valid XHTML.

I've tried vanilla and jquery javascript but neither works.

However, when I paste them on the developer console both work as expected.

Any idea?
thanks!

<!-- teste custom headers  plugin para melhorar backend -->
<script>
// Cria um novo botão
var newButton = document.createElement('button');
newButton.innerHTML = 'Verificar Avaliações <span aria-hidden="true" class="fa fa-check-circle"></span>';

// Adiciona o botão ao cabeçalho
var headerActions = document.querySelector('.app__headerActions');
headerActions.appendChild(newButton);

// Adiciona o evento de clique ao botão
newButton.addEventListener('click', function() {
    var count = 0;
    document.querySelectorAll('li.listPanel__item').forEach(function(li) {
        if (li.textContent.match(/[2-9]+\/[2-9]+/)) {
            li.style.backgroundColor = '#99ff9d';
            count++;
        }
    });

    if (count > 0) {
        alert(count + ' submissões com 2 ou mais avaliações concluídas.');
    }
});
</script>
<!-- teste custom headers  plugin para melhorar backend -->
<script>
$(document).ready(function() {
    // Cria um novo botão
    var newButton = $('<button/>', {
        html: 'Verificar Avaliações <span aria-hidden="true" class="fa fa-check-circle"></span>',
        click: function() {
            var count = 0;
            $('li.listPanel__item').each(function() {
                if ($(this).text().match(/[2-9]+\/[2-9]+/)) {
                    $(this).css('backgroundColor', '#00FFbb');
                    count++;
                }
            });

            if (count > 0) {
                alert(count + ' submissões com 2 ou mais avaliações concluídas.');
            }
        }
    });

    // Adiciona o botão ao cabeçalho
    $('.app__headerActions').append(newButton);
});
</script>

Fatal error in PHP 8 when getting request

PHP Fatal error: Uncaught Error: Non-static method PKPApplication::getRequest() cannot be called statically in /var/www/html/plugins/generic/customHeader/CustomHeaderPlugin.inc.php:112

See forum.

PHP fatal error

I get this error with PHP 8.1 and OJS 3.3.0.11

[php:error] [pid 2434172] [client 37.103.18.12:40340] PHP Fatal error: Declaration of CustomHeaderSettingsForm::execute($request, ...$functionArgs) must be compatible with Form::execute(...$functionArgs) in /var/www/ojs/plugins/generic/customHeader/CustomHeaderSettingsForm.inc.php on line 71, referer: https://aldrovandiana.it/management/settings/website

shortcode if there is no sidebar

Hi,
how to handle the tag clouds if there is no sidebar for the theme? can you help me in sending a piece of code to put anywhere to atleast use the plugin? TIA

Also customFooter?

It would make sense to add a CustomFooter option (within the same plugin), or separate plugin.

Some Javascript is best loaded late, and some Javascript might depend on code that is not yet loaded (e.g., jquery). Thus, adding custom JS very late would make sense.

Settings not visible

After installing this plugin is only listed in the plugin gallery but does not show in the installed plugins. Where can I find the plugin settings so that I can add custom js to a journal?
OJS version I am using: OJS 3.3.0.14
Plugin version: 1.0.4.1

Provide support for editorial backend injection as well

ctgraham writes:

We have the Custom Headers Plugin to allow arbitrary javascript/css/meta customization of the public interface, but no parallel for the backend editorial interface. I have a use-case requesting the ability to load a javascript widget in the editorial interface which I think makes sense, and I think the general principle is broadly applicable. I'm picturing Pitt ULS creating a maintaining an "Editorial Custom Headers Plugin" in the Plugin Gallery. Any reasons this has not be done to-date, or any reason why this wouldn't be a good idea?

natewr suggests:

I suspect a PR for the custom headers plugin might be welcome. Just add a second text field for headers that should be loaded on the editorial backend.

asmecher affirms:

Yup, that would be a no-fuss solution.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.