Giter Site home page Giter Site logo

Purge call history log with one click about gs5 HOT 1 OPEN

amooma avatar amooma commented on August 19, 2024
Purge call history log with one click

from gs5.

Comments (1)

duebel- avatar duebel- commented on August 19, 2024

It is not one single click but two:

diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml
index 9c2cf39..cee4d8c 100644
--- a/app/views/call_histories/_index_core.html.haml
+++ b/app/views/call_histories/_index_core.html.haml
@@ -9,6 +9,8 @@
           %th{:width => '10px'}
             = button_tag(:type => 'submit', :class => 'btn btn-mini btn-danger', :confirm => t("call_histories.index.actions.confirm_selected")) do
               %i{:class => 'icon-trash icon-white'}
+            = button_tag(:type => 'button', :class => 'btn btn-mini btn-info', :id => 'check_all') do
+              %i{:class => 'icon-check icon-white'}
           %th
             =sortable :start_stamp, t("call_histories.index.date")
           %th{:width => '10px'}
@@ -22,6 +24,8 @@
       %tfoot
         %tr
           %td{:colspan => 2}
+            = button_tag(:type => 'button', :class => 'btn btn-mini btn-info', :id => 'uncheck_all') do
+              %i{:class => 'icon-check icon-white'}
             = button_tag(:type => 'submit', :class => 'btn btn-mini btn-danger', :confirm => t("call_histories.index.actions.confirm_selected")) do
               %i{:class => 'icon-trash icon-white'}
             = t("call_histories.index.actions.destroy_multiple")
@@ -97,3 +101,6 @@

               - if can? :destroy, call_history
                 = link_to raw("<i class = 'icon-trash icon-white'></i> ") + t('call_histories.index.actions.destroy'), [@sip_account, call_history], :method => :delete, :remote => true, :class =>
+  :javascript
+    $('#check_all').on("click", function(){ $('input[type="checkbox"]').click(); });
+    $('#uncheck_all').on("click", function(){ $('input[type="checkbox"]').click(); });

from gs5.

Related Issues (20)

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.