定制 occ2/progress-bar 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

occ2/progress-bar

Composer 安装命令:

composer require occ2/progress-bar

包简介

Simple progress bar control for Nette Framework. Based on Twitter Bootstrap 3

README 文档

README

Simple progress bar control for Nette Framework.

Requirements:

PHP >=5.6 Nette >=2.4 Twitter Bootstrap >=3 (not for version 4) nette.ajax.js

###Installation: composer require occ2/progress-bar

  • copy assets/autorefresh.ajax.js to your_www_js_dir/ext and link it in your page.
  • don't forget to have Twitter bootstrap css and js files linked to your page

Usage in presenter

public function createComponentProgressBar(){
        $m=$this->model;
        $callback = function() use($m){
            return $m->getValue(); //change what you need .. must return integer !!
        };
        $config = [
            "title"=>"BAR TITLE", // bar title
            "minValue"=>0, // minimul value
            "maxValue"=>100,// maximum value
            "valuePrefix"=>"", // text before shown value
            "valueSuffix"=>"%", // text after shown value
            "showValue"=>true, // show value in progress bar?
            "strippedStyle"=>true, // use stripped style
            "animatedStyle"=>true, // use animated bar
            "colorStyle"=>"success" // color style (available info/warning/success/danger)
            "warningThreshold"=>null, // switch to warning style (if null nothing switched)
            "dangerThreshold"=>null // switch to danger style (if null nothing switched)
            ];
        $refreshTime = 3; // time to automatic AJAX refresh (set null if autorefresh disabled)
        return new \OCC2\ProgressBar\ProgressBar("cpuLoad", $callback, $config, $refreshTime);
}

###Usage in latte template

{control progressBar}

Usage of autorefresh.ajax.sh

  1. During $.nette.init() all elements with class .autorefresh is found and read url ant time
  2. URL of autorefresh is in data-refresh-url attribute
  3. Refresh time is in data-refresh-time attribute

统计信息

  • 总下载量: 28
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-09-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固